The problem with @properties in D

Jonathan M Davis jmdavisProg at gmx.com
Tue Dec 13 17:34:29 PST 2011


On Wednesday, December 14, 2011 00:07:53 F i L wrote:
> Robert Jacques wrote:
> > We haven't gone back and normalized the older keywords as that
> > would result in the pointless breaking of existing code.
> 
> I know @attributes are of minor importance at this time, however,
> I don't think "can't change it cause people use it" is an
> effective strategy when evolving a language. Any core changes
> could be bundled into a D3 spec and major D version could
> maintain a support lifetime which more accurately reflects
> community version dependency. I see the recently announced death
> of D1 as a step in this direction.

Once enough has stabilized in a language, it becomes much more costly to 
change stuff, and the @ attributes were not added early in the development of 
D2. Also, some changes would arguably just be too much for too little gain. 
For instance, public, private, etc. are all attributes. It would make porting 
to D2 more of a pain and add extra cognitive load to anyone coming from 
languages such as C++, Java, and C# for little gain to make them @public, 
@private, etc. And at this point, D2 is far enough along that breaking changes 
need fairly strong justification to be made. If/When we do D3 (it won't be for 
years), then more breaking changes can be added to the language, but there's 
no way that something like attributes would be changed for D2 at this point. 
The gain is debatable and trivial, and the cost is huge.

D2 already breaks plenty of stuff from D1, C++, Java. etc. as it is, so it's 
not like it's always taken the stance of avoiding breaking changes. It's just 
that it's too far along now to make breaking changes without a really good 
reason.

- Jonathan M Davis


More information about the Digitalmars-d mailing list