On Wed, 21 Feb 2018, Ryan Joseph wrote:
On Feb 21, 2018, at 4:09 PM, Mattias Gaertner <nc-gaert...@netcologne.de> wrote:
I doubt that many would be using scopedenums for that.
why not? Scoped enums did clean that up a little but still lots of extra typing
during assignments and parameters.
That compared to the previous is a still win though (less code is always a good
thing).
{$scopedenums on}
type
TTileSortingFlag = ( Static,
Ramp,
Ignore,
Particle,
Floor,
Flat,
Container,
OnRamp,
BufferStatic,
BufferDynamic
);
{$scopedenums off}
And if you use
type
TTileSortingFlag = ( tsfStatic,
tsfRamp,
tsfIgnore,
tsfParticle,
etc. );
You don't need scoped enums at all and the problem goes away.
You create a problem, and then you demand that the compiler introduces
tricks to solve the problem you created. Where is the logic in that ?
Don't create the problem to begin with, and we can all spend our time on
something more useful.
Michael.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal