> On Feb 21, 2018, at 10:13 PM, Michael Van Canneyt <[email protected]>
> wrote:
>
> You lose an important type safety if you replace them with constants.
I like enums also but you can imagine when they were proposed the compiler
teams probably compared them to constants and decided if they were worth it
bloat or not (much like my suggestion and what Swift decided to do). Ultimately
it’s just another thing the user can do themselves instead of compiler but if
you follow that road too far you’re back to assembly (on the other end is
Java/Swift super high level languages).
Btw did enums exist in the first Pascal specs? I honestly kind of forgot about
them since I was doing desktop apps from C based API’s that used all constants.
Regards,
Ryan Joseph
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal