Proposal to add 'Elements of Programming' Concepts to std.traits

bearophile bearophileHUGS at lycos.com
Sat Jun 16 08:58:12 PDT 2012


Guillaume Chatelet:

> A minimalistic website maintains the concepts defined so far 
> and the C++ code
> http://www.elementsofprogramming.com/

That page looks quite interesting. I'll take a better look later 
(I have not read that book).

In a recent (probably no more than one year old) talk by Bjarne 
Stroustrup, he has shown a list of concepts that fits mostly in 
one slide. So he has significantly reduced the number of Concepts 
needed for the STL.


> Now on the downside, D being a C-style-system-language, we 
> won't be able to prevent implicit lossy conversions

D disallows some implicit conversions (float => int, int => 
short, etc).
The conversions like uint=>int and int=>uint are an open problem, 
waiting for some solution (a simple "solution" is to add a 
warning, as in GCC. It's not a great solution, but maybe it's 
better than the current D situation).


> or add value domain constrains as
> in the X10 language for instance.

Please explain, don't assume all people here know X10.

Bye,
bearophile


More information about the Digitalmars-d mailing list