All function attributes possible with "@"?

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Wed Dec 14 13:02:09 PST 2016


On Wednesday, 14 December 2016 at 12:00:04 UTC, ketmar wrote:
> On Wednesday, 14 December 2016 at 09:51:00 UTC, Joseph Rushton 
> Wakeling wrote:
>> On Wednesday, 14 December 2016 at 03:49:23 UTC, Jonathan M 
>> Davis wrote:
>>> I say that when dealing with the built-in attributes, just 
>>> treat @ like another letter in the keyword, learn it, and 
>>> move on.
>>
>> **Applause**
>>
>> This is such a small thing and it is no problem at all to get 
>> used to.  Much better to focus on things that can really make 
>> a difference.
>
> exactly the kind of logic that made c++.
>
> if someone have to "get used" to something in the language, and 
> there is no way to logically deduce it, the language has A HUGE 
> PROBLEM. there just can't be more important things. 'cause it 
> doesn't matter how much features your language has: if it 
> require random memorization, it won't attract people. with c 
> and c++ we haven't much choice, but now there are alot of 
> languages.

The reality of the matter is that unless you're willing to 
frequently break everyone's code, at some point, you're going to 
be stuck with imperfections in the language. The only way to 
avoid that would be to get it perfect at the start, and that 
obviously never happens. If we keep making breaking changes, we 
will never have a significant user base - especially if the 
changes are stylistic rather than providing real, technical value 
that fixes problems that people have with their code.

Some breaking changes are still worth making, because they 
provide enough value, but the older the language gets and the 
more people there are using it, the higher the bar gets for 
breaking changes. And yes, that risks creating a bit of a mess of 
a language like happened with C++. And eventually, someone will 
go and create D++ or E or whatever to replace D, because they 
want something better. And they'll get improvements along with a 
new set of mistakes that will result in ugliness in the language. 
And eventually, someone will decide to come up with a language 
that improves on that one. Etc.

D is better than C++, because we were able to learn from its 
mistakes, but that doesn't mean that we're not doomed to have the 
same sort of cruft or inelegance problems that C++ has, much as 
we'd like to avoid it.

> "just get used to that small thing" is a big thing that ruins D.

Perhaps, but if so, every language that gets any kind of real 
world usage is doomed to be ruined. At some point, every real 
world language is going to have something that can't be fixed 
without breaking everyone's code and isn't worth breaking 
everyone's code over. And at some point, in order to add a new 
feature, ugliness is going to creep into the language, because it 
was tacked on later, and the rest of the language can't be 
changed in a way that would break code. Yes, that sucks, but 
that's life.

- Jonathan M Davis


More information about the Digitalmars-d mailing list