[fpc-devel] Initialize/Finalize management operators and Default intrinsic
Michael Van Canneyt
michael at freepascal.org
Tue Apr 12 15:37:06 CEST 2016
On Tue, 12 Apr 2016, Maciej Izak wrote:
> 2016-04-12 14:48 GMT+02:00 Michael Van Canneyt <michael at freepascal.org>:
>
>> I really don't think you should delegate such things to attributes. You
>> make 2 completely unrelated language constructs suddenly related. A bad
>> design decision.
>
>
> I think you are wrong. Attributes are not only dedicated to RTTI just look
> at other languages: Delphi, C#, Java. Instead of extending language into
> infinity you can use simple attribute with parameter. I don't see any
> reason why don't use attributes to describe some compiler/RTL behavior? Any
> attribute can be easier placed in many language structures without breaking
> language syntax. That is much harder with new keywords.
>
> Maybe that is not ideal but works excellent.
Nono.
You deviate from an important design principle: orthogonality.
By linking 2 concepts, any change in 1 concept risks to influence the other.
This is ALWAYS bad. If you implement things orthogonally, a change in 1
concept does not risk influencing the other.
So you will really, really have to provide better arguments than 'but works excellent'.
Michael.
More information about the fpc-devel
mailing list