Core vs Library

Don nospam at nospam.com
Tue Apr 15 00:40:41 PDT 2008


Jarrett Billingsley Wrote:

> "Walter Bright" <newshound1 at digitalmars.com> wrote in message 
> news:ftv48m$21m5$1 at digitalmars.com...
> > http://reddit.com/info/6foi8/comments/
> 
> 1: Yes, in .Net languages the core types are aliases to structs in System, 
> not the other way around.
> 
> 2: The article seems self-contradictory.  First you say that an int as a 
> struct is slow, possibly ugly, can't be optimized, etc. etc.  But then you 
> turn around and say that modern compilers can make a user-defined complex 
> type efficient.  Which is it?  It doesn't feel like the article comes to any 
> kind of conclusion.  Is it that fundamental types like int and float should 
> be builtin, while anything higher-level including complex can be done 
> satisfactorily as a library? 

I got the message that there's a 'sweet spot' in how much the language does vs how much the library does. With advances in compiler technology, the sweet spot is gradually moving towards library implementation, but it's unlikely that it will *ever* move to 100% library, and it's certainly not there now. Currently the sweet spot is roughly at complex numbers.

-don.




More information about the Digitalmars-d mailing list