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

Re: enum and named sets


Le 09/12/2025 à 03:55, Jussi Lahtinen a écrit :
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

I rarely use enum in C, prefering #define.

But if an enum is really private, how can it be used outside of where it is declared?

If I make enumerations a pseudo-type in Gambas, private enumerations will only be able to be used inside the class it is declared, exactly like private static constants. They will be invisible and unknown from the outside.

--
Benoît Minisini.


Follow-Ups:
Re: enum and named setsJussi Lahtinen <jussi.lahtinen@xxxxxxxxx>
Re: enum and named setsbrian <brian@xxxxxxxxxxxxxxxx>
References:
enum and named setsBrian G <brian@xxxxxxxxxxxxxxxx>
Re: enum and named setsJussi Lahtinen <jussi.lahtinen@xxxxxxxxx>