A simple rule

downs default_357-line at yahoo.de
Fri Jul 31 11:23:18 PDT 2009


Leandro Lucarella wrote:
> downs, el 30 de julio a las 22:31 me escribiste:
>> To clarify for a few criticisms that have come up in IRC: this is meant as a rule of thumb to fall back on where no other considerations are present.
>>
>> For instance, const and shared are type constructors, and as such hard to do in the standard library.
>>
>> To my knowledge, assert() for instance has no such mitigating considerations.
> 
> I like the idea of moving as much as possible to library code, but for the
> sake of simplicity, I think most of the stuff moved should be "built-in",
> like Object, ClassInfo, etc. You shouldn't import anything to use
> assert() if you want to promote it's use, like I said with tuples (I think
> even references, dynamic arrays and associative arrays should live in the
> library, even when they have specialized syntax).
> 

Oh I fully agree; stuff like assert belongs in a public import from object.d.

> This could make implementing a new compiler way simpler if you have an
> standard library/runtime available. And you have the extra advantage of
> being able to change the implementation of core constructs without
> touching the compiler.
> 

Exactly my thoughts.



More information about the Digitalmars-d mailing list