Implicit conversions through purity

bearophile bearophileHUGS at lycos.com
Tue Apr 15 11:01:59 PDT 2014


Steve Teale:

> Since this is D-Learn, I can be indignant, and say that D needs 
> to get its act together, and have a clean definition of 'pure'. 
> What you describe is not only undocumented, but also far too 
> complicated - pure weak nothrow dontpiss kissmyass @never, and 
> so on if the direction continues.

There is a nice article on D purity that I suggest you to read. 
Unfortunately I don't remember the link.

To design a system language as complex as C++/D you need lot of 
mathematics and theory. Andrei is good in computer science theory 
and in complex programming too, but Walter is less 
mathematically-minded and this could be visible in the design of 
some parts of D. Anyway, everyone is doing their best, Walter is 
very good and he has all my respect. And in a real-world system 
language a clean definition of pure (like the original pure 
implementation of D) is not very useful. The current definition 
of pure of D is good enough and it's a part very near to be 
completely implemented (unlike many other parts of D like 
synchronized, scope, SIMD, vector operations, operator 
overloading, dynamic libraries, GC, and more). So please don't be 
too much indignant, we don't have the research laboratories of 
Microsoft :-)


> Nontheless, thank you for your assiduous efforets to make D 
> internally consistent.

In the end I am not doing much. At best I can only hope to spot 
some sharp corners of the language, and ask for them to be 
smoothed. But it's very hard to make progress. And lately Andrei 
(perhaps rightfully) has raised the bar regarding the acceptable 
breaking changes. And people like Kenji have a mind better than 
mine (able to think about tens of corner cases, able to keep in 
mind many complex interactions, etc) even when they are sleeping 
:-)

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list