[Lazarus] Please define "delphi compatibility"

Sven Barth pascaldragon at googlemail.com
Sun Oct 14 14:09:17 CEST 2012


On 14.10.2012 12:49, Joost van der Sluis wrote:
> On Thu, 2012-10-11 at 11:55 +0200, Sven Barth wrote:
>> Am 10.10.2012 18:42, schrieb Florian Klämpfl:
>>> Am 10.10.2012 16:11, schrieb Bart:
>> I would even go into the opposite direction and adjust Delphi's
>> attribute syntax:
>
>> to a more Pascal like:
>>
>> === hypothetical example ===
>>
>> type
>>     TSomeClass = class
>>       property SomeProperty {...} attributes [Some3rdAttribute('a', 'b')];
>>     end attributes [SomeAttribute(1, 2, 3), SomeOtherAttribute];
>>
>> === hypothetical example ===
>
> I don't know if you participated in the discussion about this feature
> before I started the first implementation. But we discussed this then. I
> decided not to do it, for the simple reason that I don't need it since
> I'm doing this for an application that has to be compiled by both Delphi
> and fpc. And as I was the one who implemented it, I had to decide.
>
> But feel free to add this syntax to objfpc mode. This can be done on the
> parser level only. And it's simpler then the 'Delphi' syntax as it does
> not need to remember the attribute until it parses the next statement.
> (Which is off course why the Delphi-class-attributes-syntax is not a
> Pascal syntax at all)

Yes, I did participate in that discussion where I raised this remark as 
well. :)

The reason that the syntax suggested by me is "easier" for the parser is 
the main reason why I suggested it at all... (besides being more 
Pascalish ;) )

>> And if Joost isn't fast enough with his attributes branch I might do
>> that indeed ;P
>
> In fact that branch works completely, as far as I know. I have to add
> some more tests, and maybe some checks here and there. But the
> attributes do work.

I will answer to this on core.

Regards,
Sven




More information about the Lazarus mailing list