[fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

Jonas Maebe jonas.maebe at elis.ugent.be
Fri Jul 17 15:02:12 CEST 2015


Sven Barth wrote:
> Am 17.07.2015 11:06 schrieb "Nikolay Nikolov" <nickysn at gmail.com
> <mailto:nickysn at gmail.com>>:
>  > Btw, just an idea: why not make the generic syntax a {$modeswitch}?
>  > This way people will be able to switch on the delphi generics syntax in
>  > objfpc mode.
>
> That's on my ToDo list for quite some time already ;)

I really wouldn't like that. While we already have a lot of modeswitches 
that allow for a lot of flexibility, at the very basic level every 
modeswitch is one too many: they make reading code more complex (either 
because you have to know which modeswitches are active to know what a 
certain expression means, or because you're simply only familiar with 
code written with that modeswitch either turned on or off).

modeswitches should only be added because it's simply not possible 
otherwise without an explosion of syntax modes, or because they're a 
cross-cutting add-on. But not for syntactic differences...


Jonas



More information about the fpc-pascal mailing list