[fpc-pascal] Constants in generics

Ben Grasset operator97 at gmail.com
Sun Nov 11 02:34:30 CET 2018


On Thu, Nov 8, 2018 at 11:50 PM Ryan Joseph <ryan at thealchemistguild.com>
wrote:

> Question: should other consts besides integers be allowed? I don’t think
> it makes sense personally to use strings, floats or sets but maybe I’m
> wrong.
>

As a daily FPC user there's nothing I find more annoying than compiler
restrictions that are visibly artificial, so I'd say you should definitely
allow basically anything that's physically possible to allow in that
context.
*Someone* will find it useful, trust me. I can already think of various
uses for string constants as generic parameters that I certainly would have
already done in the past if I could have, for example.

On Thu, Nov 8, 2018 at 11:50 PM Ryan Joseph <ryan at thealchemistguild.com>
wrote:

>
>
> > On Nov 9, 2018, at 4:28 AM, Florian Klämpfl <florian at freepascal.org>
> wrote:
> >
> > I like the idea of const in generics, but it needs serious cleanup when
> it's working:
>
> Question: should other consts besides integers be allowed? I don’t think
> it makes sense personally to use strings, floats or sets but maybe I’m
> wrong.
>
> Regards,
>         Ryan Joseph
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20181110/9999fae5/attachment.html>


More information about the fpc-pascal mailing list