www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: property / getProperty() / setProperty()

reply bearophile <bearophileHUGS lycos.com> writes:
Andrei Alexandrescu:
 We can't throw keywords at problems like they're getting out of style. 
 I've noticed that here every little problem gets solved by a little 
 keyword. If not, some arcane new syntax.

I agree, attributes (or something like that) are a better solution to this (and other) problem. Anyway, this discussion is going in circles :-) Bye, bearophile
Aug 01 2009
parent reply aarti_pl <aarti interia.pl> writes:
bearophile pisze:
  > I agree, attributes (or something like that) are a better solution 
to this (and other) problem.

What you mean saying "attributes"? Probably I missed some posts...

BR
Marcin Kuszczak
(aarti_pl)
Aug 01 2009
parent reply bearophile <bearophileHUGS lycos.com> writes:
aarti_pl:
 What you mean saying "attributes"?<

See for example: http://en.wikipedia.org/wiki/Java_annotation It's not an esoteric thing, It's a way to add some extra semantics to a program. In a low-level language like D there are other possible purposes for annotations/attributes (that aren't useful in Java), you can add semantics that helps avoid bugs or can be used by the optimizer to increase the efficiency of the compiled program (GCC too has some of such function/variable attributes), I can show some examples. Bye, bearophile
Aug 01 2009
parent reply aarti_pl <aarti interia.pl> writes:
bearophile pisze:
 aarti_pl:
 What you mean saying "attributes"?<

See for example: http://en.wikipedia.org/wiki/Java_annotation It's not an esoteric thing, It's a way to add some extra semantics to a program. In a low-level language like D there are other possible purposes for annotations/attributes (that aren't useful in Java), you can add semantics that helps avoid bugs or can be used by the optimizer to increase the efficiency of the compiled program (GCC too has some of such function/variable attributes), I can show some examples. Bye, bearophile

Thanks for answer! I know Java annotations - I just didn't know what you meant saying "attribute". BR Marcin Kuszczak (aarti_pl)
Aug 01 2009
parent Ary Borenszweig <ary esperanto.org.ar> writes:
aarti_pl escribió:
 bearophile pisze:
 aarti_pl:
 What you mean saying "attributes"?<

See for example: http://en.wikipedia.org/wiki/Java_annotation It's not an esoteric thing, It's a way to add some extra semantics to a program. In a low-level language like D there are other possible purposes for annotations/attributes (that aren't useful in Java), you can add semantics that helps avoid bugs or can be used by the optimizer to increase the efficiency of the compiled program (GCC too has some of such function/variable attributes), I can show some examples. Bye, bearophile

Thanks for answer! I know Java annotations - I just didn't know what you meant saying "attribute".

Ah, it's because in C# they are called attributes. You know, C# and Java always try to come up with the same things but with different names. :-P
Aug 01 2009