[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: enum and named sets


There should NOT exist private enums or enums which cannot be exported.
Someone is going to use them in some library/interface and then change
later breaks everything using the library.
I have suffered this in C a few times. I never use enums.

Jussi

On Sat, Dec 6, 2025 at 10:10 PM Brian G <brian@xxxxxxxxxxxxxxxx> wrote:

> Would it be useful or possible to allow the naming of enum sets such
> that they could be referenced by that name
> collectively without having to generate a special class with just a
> public enum. This could be very useful I think.
>
> Or maybe there is already a simple way to do this!
>
> Such that
>
> enum this_set_name  none,fast, slow,red,green
>
> this allowing things like
>      dim setcounter[] as new integer[5]
>      inc setcounter[none]
>      inc setcounter[green]
>
> or
>
>      for each xx as variant in this_set_name
>          print setcounter[xx]
>      next
>
> --
> ~~~~ Brian
>
>

Follow-Ups:
Re: enum and named setsFabien Bodard <gambas.fr@xxxxxxxxx>
Re: enum and named setsBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
References:
enum and named setsBrian G <brian@xxxxxxxxxxxxxxxx>