too much sugar not good for the health

Davidl Davidl at 126.com
Wed Mar 21 07:36:42 PDT 2007


it's totally not arbitrary. since AA in D is a container, but we lack of
method to operate on it and even more with any resort to add method for it
on user land.
So functions as Array Properties in a language with AA is a must. it looks
beautiful, and we can extend our AA with funcs and they work as methods  
like
way. it's reasonable. i used to think in ur way either. But after u post
this, and i consider the AA's func stuff, i finally realize why we don't  
get
rid of this feature.

> Reading through "D Specification", I'm a bit surprised.  I believe the  
> goal
> of D is to be a clean, improved C++.  Yet, there are a number of  
> instances
> where syntactic 'sugar' is added in ways that seem almost arbitrary.  The
> latest example I found is 'Functions as Array Properties'.  I'm not sure
> what overwhelming need this syntax fulfills, maybe I'm missing something.
>
> There is a lot of extra conceptual overhead in adding extra syntax.  One
> might argue that "You don't have use it if you don't like it.".  That is,
> unfortunately, not really true.  If other's use it and I have to grok  
> there
> code, I need to understand the extra rules.
>
> I've been following D with great interest.  I hope the language will not  
> add
> such 'features' without great need - it really detracts from the purity  
> and
> simplicity.




More information about the Digitalmars-d mailing list