[fpc-devel] (class) helper questions

Alexander Klenin klenin at gmail.com
Tue Mar 15 19:18:00 CET 2011


On Tue, Mar 15, 2011 at 09:05, Paul Ishenin <webpirat at mail.ru> wrote:
> 15.03.2011 3:22, Jonas Maebe wrote:
>>
>> On 14 Mar 2011, at 21:07, Sven Barth wrote:
>>
>>> I have tought about this topic a bit more. On the one hand I still want a
>>> cleaner syntax for this, but on the other hand I also understand that others
>>> want to have the ability to use "objfpc" code in Delphi with as less ifdefs
>>> as possible (or the other way round).
>>
>> It's not just that. It's also that it adds extra code to the compiler that
>> must be maintained and that makes the parser more complicated.
>
> Also from time to time we find bugs in another proposed syntax and that
> other syntax becomes removed.

IMHO the syntax difference is so small it does not worth all the complications.
However, as a compromise I can suggest inplementing it as:

TypeIdentifier = [class|record] helper(ParentHelper) for ExtendedType

i.e. make "class|record" keyword optional in objfpc mode, but do NOT
allow it after "for". This way, objfpc syntax will be
backwards-compatible with Delphi.

-- 
Alexander S. Klenin



More information about the fpc-devel mailing list