Why do some language-defined attributes have @ and some not?

via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Oct 24 08:06:24 PDT 2014


On Friday, 24 October 2014 at 14:23:04 UTC, Shriramana Sharma via 
Digitalmars-d-learn wrote:
> As for the cases when serious changes to the grammar are 
> needed, I
> feel the Py2 to Py3 transition is a good example to emulate. 
> Lots of
> cleanup happened in Py3, Py2 is still supported, and there 
> exists
> tools like 2to3 and six (https://pypi.python.org/pypi/six) to 
> help
> people bridge the gap.

I agree that "@"-stuff is trivial, but I don't think Python sets 
a good example. The codebase is basically divided in two, 
libraries have to support both, and I think they should have 
changed more if going to the trouble.

In essence you should either change so little that upgrading is 
trivial or you should improve the language enough to ensure that 
all new projects choose the improved language.

However, Python is in widespread use on a fairly massive scale 
and is dynamic, which makes breaking very serious as it happens 
at runtime.

D could with little trouble undergo a massive change where the 
static type system catch the issues and call it D3.

The real problem is that there is no design for a D3 rooted in a 
semantic model that is clean. Such a transition would require a 
solid formal specification where you eliminate all weird aspects.

But I don't think anyone is working on a new spec? I am willing 
to help out if other people are interested.



More information about the Digitalmars-d-learn mailing list