> 5 maj 2020 kl. 07:19 skrev Sven Barth via fpc-pascal > <fpc-pascal@lists.freepascal.org>: > > Am 05.05.2020 um 04:16 schrieb Ryan Joseph via fpc-pascal: >> >> >>> On May 4, 2020, at 10:44 PM, Michael Van Canneyt <mich...@freepascal.org> >>> wrote: >>> >>> That is how enums work by default in Pascal. >>> >>> If you don't force scoped enums, you can still scope them. >>> >>> if you use >>> $scopedenums on then you simply force the use instead of having it optional. >> But the names collide then, that's the whole point. We want to protect >> against name collisions and we don't want to type long prefix names every >> time. Scoped enums fixes half of that by formalizing the prefix syntax but >> you still need to type it even when it could be inferred by context. >> >> Swift figured out how to do this and so should Pascal imo. > > Surprise: Pascal is /not/ about writing less. Pascal is about writing correct > code.
Couldn't agree more! /Bjarne. (back to lurking) _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal