[fpc-devel] Pascal Standard, and what we can do.
pascaldragon at googlemail.com
Thu Jul 23 11:23:33 CEST 2015
Am 23.07.2015 09:21 schrieb "Maciej Izak" <hnb.code at gmail.com>:
>> > Some people love Oxygene, and you can't tell that the Oxygene is not
the Pascal. Any new construction will be "non pascalish" at first glance.
>> No, that depends heavily on the specific construction. Mostly whether it
was obviously just "ripped" from other languages like C# without giving a
second thought about the way how things should be done in Pascal (for
example attributes or Delphi's generics) or not (for example tuples in
> IMO Delphi/Oxygene generics are better for real life development. FPC
specialize keyword is nightmare and not intuitive construction. Generics
should be short in usage. They exist for clear and reusable constructions.
I need to cite you: "Prefixed modifiers are the /worst/ you can do for
Pascal.". By introducing "specialize" keyword, you deny yourself.
I should have written this in the other thread where you mentioned this,
but I forgot, so: I agree that "specialize" falls into the same "prefixed
modifiers are the worst" category. The cleanest way for specializations
would be something like "TMyGeneric with (Longint, String)" or so, this way
there would be no potential disambiguity.
Nevertheless "specialize" had been introduced before my time, so I'm merely
working with what already /is/ part of the Free Pascal dialect (generics
were first introduced in 2.2 and I started working on the compiler with
That said: I /am/ working on Delphi compatible generics (in fact 3.0 is a
big improvement compared to 2.6 in that regard, but it's still quite a way
to go) and thus you /will/ be able to work with them in mode Delphi. So
just use that mode and be happy.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-devel