Eliminate assert and lazy from D?

Adam D. Ruppe destructionator at gmail.com
Mon Oct 12 22:17:19 PDT 2009


On Mon, Oct 12, 2009 at 11:33:57PM -0500, Andrei Alexandrescu wrote:
> Right now, the language has enough power to express assert as a library 
> function, as opposed to a primitive construct. (See e.g. enforce.) I 
> think it would be good to relegate assert to object.d.

What about static assert? Can it be moved to the library too?

If not, it seems kinda weird that assert() is just a lib function, but if
you put static before it, it becomes a completely different thing.

> I personally believe it's useful to be able to pass an unevaluated 
> expression into a function, for example assert and enforce themselves 
> use that.

I pretty rarely use it, but I'd be sad to see it go - it really does make
a few things more elegant.

-- 
Adam D. Ruppe
http://arsdnet.net



More information about the Digitalmars-d mailing list