[fpc-devel] Re: Testing for..in feature

Marco van de Voort marcov at stack.nl
Wed Nov 4 15:16:50 CET 2009


In our previous episode, Matt Emson said:
> > Sparse enums are simply a kludge. They were needed because they exist in the Windows API, and afaik for that only. IOW for easy translation of Windows types.
> 
> They were added to Delphi in version 6. I though they added them to 
> support Qt and the CLX, which relied on Qt as its underlying base 
> toolkit. They were common in C/C++ before that though.

Well, anyway, foreign interfacing related, not core language feature.
 
> The problem I always had with Pascal supporting them was that a Pascal 
> enum was designed to represents the position in a sequence and not 
> necessarily an underlying integral value - where as a sparse enum is 
> simply a grouping for a bunch of numerical values at the whim of the 
> developer.

I never had a problem with that. I use them in headers, and not otherwise,
so I never have a problem :-)




More information about the fpc-devel mailing list