[fpc-pascal] Scoped enums and inferred types

Ryan Joseph ryan at thealchemistguild.com
Wed Feb 21 08:05:05 CET 2018

> On Feb 21, 2018, at 1:54 PM, Michael Van Canneyt <michael at freepascal.org> wrote:
> So this is "as designed". If you want to be able to write A, don't use
> scoped enums.

I got the idea from Swift (one of the things it does right) and it’s really nice to be able say "this = .value” instead of NSSomeLongNameOfSomethingValueKey. It only works with assignments but it really cleans up code. The reasons I suggested it was because some of my function calls were just getting stupid long and annoying to type plus difficult to remember (that’s important for programmers!) so the compiler could certainly help here.

	Ryan Joseph

More information about the fpc-pascal mailing list