[fpc-devel] New feature announcement: constant parameters for generics
Marco van de Voort
fpc at pascalprogramming.org
Sun Apr 26 22:36:48 CEST 2020
Op 2020-04-26 om 11:02 schreef Michael Van Canneyt:
>>> As the original author, can you say something about the intended use
>>> of this feature ?
>> It was meant for a pretty narrow use of array types. If I knew how
>> much work it would be to implement I probably would have not done it.
>> :P I personally wanted it for static array lists that had methods
>> like Add/Delete.
> Fixed-length arrays are the only practical use I can think of.
Valuetype sets of enum>256 elements. Type T is the enum, const is
ord(high(enum) div 32)+1
De const is then a high bound of the array, type T is only used to
implement the operators and methods.
More information about the fpc-devel