Andrei Alexandrescu:
> We will need to accommodate multiple implicit conversions somehow anyway 
> (e.g. multiple alias this entries). This is a great question because it 
> illustrates how segregating arrays out of the language challenges the 
> magic that made them "special" and democratizes good features such that 
> other types can benefit of them too.

Making things more orthogonal can be quite useful and it allows more 
flexibility, but having common things implemented as magic is sometimes good 
because you need less knowledge to use the language, you need less time to 
understand code written by other people (because there are less general ways to 
do something), and this allows for more sharing of code, and you may cover most 
of the common usages anyway. So the risk of making things more orthogonal is to 
over-generalize. Scheme language (that is very orthogonal) shows this failure 
very well, this is a related quotation:

>In practice Scheme follows exactly the opposite route: there are dozens of 
>different and redundant object systems, module systems, even record systems, 
>built just by piling up feature over feature. So the minimalism of the core 
>language is just a lie or at best a red herring (the core language can be 
>minimalistic, but the core language is basically useless for any real life 
>job).<

The Axioms of C++0x (that in theory the compiler can use to perform 
optimizations, according to Wikipedia  
http://en.wikipedia.org/wiki/C++0x#Axioms ) show one example of 
over-generalization. I think the D2 language may offer just few common Axioms 
(commutativity, etc), allowing most of the usages of Axioms and avoiding lot of 
compiler complexity to support them in general.

Bye,
bearophile

Reply via email to