OT (partially): about promotion of integers
eles
eles at eles.com
Wed Dec 12 13:23:33 PST 2012
> For each platform developer have solution as library. Right way
> is creating something new instead cutting something that exist.
Moving some of the things to from the library to the language is
hard and limitating, but sometimes it worths the effort.
An example: threads. C/C++ have those as external library (not
speaking about standard library here), as pthreads, for example.
This is very nice, but limits the degree to which the compiler is
able to optimize and to check the correctness of code, since the
very notion/concept of thread is alien to it.
Such library can be optimized just with respect to one compiler,
at most.
Take Java or D: here, threads are part of the language/standard
library. Compiler *knows* about them and about what can do with
them.
There is a trade-off.
(This issue is a bit off-topic, but it shows why it is important
that some things should be *standard*)
More information about the Digitalmars-d
mailing list