On Tue, 12 Apr 2016, Sven Barth wrote:

Am 12.04.2016 12:01 schrieb "Maciej Izak" <hnb.c...@gmail.com>:

another way is to introduce attributes for selected language elements in
Delphi compatible way. For example in Delphi we have:

  TCustomAttribute = class(TObject)
  end;
  WeakAttribute = class(TCustomAttribute);
  UnsafeAttribute = class(TCustomAttribute);
  RefAttribute = class(TCustomAttribute);
  VolatileAttribute = class(TCustomAttribute);

What I don't like about such a usage of attributes (aside from the syntax,
but that's an orthogonal problem) is that the compiler needs to be made
aware of each and every special attribute... (yes, it also needs to support
each keyword, but in the case of keywords it doesn't have to be somehow
defined in some units as well)
[Note: this is less a "I don't want it", but a "I don't like it"]

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.

Michael.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to