TheFlyingDutchman said:
The fact that you compare and criticise the simple annotations like
static or abstract with the much more powerful decorator concept shows
that, despite being the maintainer of a
soon-to-be-ruling-the-python-world Python 3 fork, lack understanding of
even the most basic language features. Which isn't exactly news.[1]
Don't you mean "lack appreciation for the non-basic language
features"? static, class and abstract
are basic language features that I appreciate. "decorators" have been
in Python for only a small part of its existence, they aren't in the
vast majority of languages (if any other language even has them) which
means people write all kinds of software without them. Or rather, most
of the software ever written didn't use decorators. Doesn't sound
basic at all.
People did write all kinds of software in Assembler. And large portions of
these people complained about every feature that some new language
introduced.
All serious languages are turing-complete. So can we put away with this
non-sense argument right away, please?
You said it was a most basic language feature. I still haven't heard
anything that leads me to believe that statement is correct. What
languages implemented decorators as a most basic language feature?
Python didn't have them for over a decade so it doesn't qualify.
As I said - you don't get it. The decorators (in conjunction with the
descriptor protocol - ever heard of that?) are very powerful yet lead as an
artifact to simple, declarative implementations of features you like,
namely static and abstract methods.
You said I had to provide a viable alternative. I did that. I haven't
heard of the descriptor protocol.
One of the problems with "getting" decorators is that they are not in
older books at all and newer books like Beginning Python from Novice
to Professional (c) 2005 Magnus Lie Hetland, that I own, devote almost
nothing to them. Out of 640 pages they are only mentioned
in one paragraph that is in a section titled "Static Methods and Class
Methods",(and followed by a class example with @staticmethod and
@classmethod).
So it seems like Magnus Lie Hetland didn't think they were very
important and he had Professional in his book title.
And as you seem being so reluctant to let new features creep into the
language, the introduction of new keywords you like?
I'm not against additions on principle.
Besides, those 'several language designers' seem to think that the
introduction of keywords isn't enough, but a general purpose annotation
scheme seems to be viable - or how do you explain e.g. JDK 1.5 Annotations?
I certainly wouldn't call them a basic language feature. Java 1.0 came
out in January 1996, Java 1.5 in September 2004. It doesn't appear
that the language designer of Java, James Gosling, is still at the
wheel or BDFL. But yes, Java is showing signs of "complexity creep".
You'll be happy to know that I really dislike the C++ template syntax
and Java has decided to add something similar.