> On Apr 25, 2022, at 2:39 PM, Martin Frb via fpc-pascal > <fpc-pascal@lists.freepascal.org> wrote: > > Actually, it's dealing with SmallInt (or ShortInt). And if the programmer > does not know that, then it might be an issue... > > Imagine the generic code (something more complex than "Add") would somehow do > something that differs for SmallInt and Integer. Like using "SizeOf(T)". This is almost a case that requires better type restrictions. If your generic function relies specifically on some particular type information this is almost not really even a good candidate to be generic at all. Regards, Ryan Joseph _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
- Re: [fpc-pascal] Feature announcement: i... Rainer Stratmann via fpc-pascal
- Re: [fpc-pascal] Feature announceme... Sven Barth via fpc-pascal
- Re: [fpc-pascal] Feature announ... Hairy Pixels via fpc-pascal
- Re: [fpc-pascal] Feature an... Marco van de Voort via fpc-pascal
- [fpc-pascal] Possible f... Thomas Kurz via fpc-pascal
- Re: [fpc-pascal] Possib... Martin Frb via fpc-pascal
- Re: [fpc-pascal] Featur... Hairy Pixels via fpc-pascal
- Re: [fpc-pascal] Featur... Marco van de Voort via fpc-pascal
- Re: [fpc-pascal] Feature an... Hairy Pixels via fpc-pascal
- Re: [fpc-pascal] Featur... Martin Frb via fpc-pascal
- Re: [fpc-pascal] Featur... Hairy Pixels via fpc-pascal
- Re: [fpc-pascal] Featur... Sven Barth via fpc-pascal
- Re: [fpc-pascal] Featur... Hairy Pixels via fpc-pascal
- Re: [fpc-pascal] Featur... Marco van de Voort via fpc-pascal
- Re: [fpc-pascal] Featur... Mattias Gaertner via fpc-pascal
- Re: [fpc-pascal] Featur... Sven Barth via fpc-pascal
- Re: [fpc-pascal] Featur... Hairy Pixels via fpc-pascal
- Re: [fpc-pascal] Featur... Hairy Pixels via fpc-pascal
- Re: [fpc-pascal] Featur... Mattias Gaertner via fpc-pascal
- Re: [fpc-pascal] Featur... Hairy Pixels via fpc-pascal
- Re: [fpc-pascal] Featur... Flávio Etrusco via fpc-pascal