[fpc-devel] Suggestion: reference counted objects

Sven Barth pascaldragon at googlemail.com
Mon Sep 22 07:52:21 CEST 2014

On 21.09.2014 19:17, Boian Mitov wrote:
> In general I would prefer to see this implemented with attributes rather
> than with new keywords. For god shake, we already have more keywords in
> this language than it is healthy. We should be extremely cautions when
> adding new ones.
> That is one of the beauty of the attributes. They can eliminate a large
> number of keywords, and expand the language dynamically (trough the
> library not trough the compiler).
> If you implement it with attributes, there is almost no need for any big
> changes in the compiler at least in the parsing side. Adding new keyword
> will probably propagate all the way to the tokenizer.

I openly *hate* the attribute syntax. It's just not Pascal and simply 
copied from their .Net compiler, because hey, other .Net compilers do 
that just like that... -.-

Also considering that the trunk compiler currently does not have support 
for attributes (let's put aside that branch for now) it is definitely 
easier to add a new keyword, because the compiler is built in a way to 
allow the easy addition of new keywords. Additionally using attributes 
would mean that one would need to add detection for special attributes. 
And that's more annoying stuff then a keyword is. Additionally this can 
be added more safely to other modes (e.g. macpas, which supports classes 
as well) than the attributes can.


More information about the fpc-devel mailing list