How about assert?

downs default_357-line at yahoo.de
Mon Apr 28 16:00:54 PDT 2008


Koroskin Denis wrote:
> On Mon, 28 Apr 2008 16:29:11 +0400, downs <default_357-line at yahoo.de>
> wrote:
> 
>> Note that if we had trailing delegate syntax, combined with a
>> break/continue convention like we currently have with opApply, as well
>> as return forwarding, foreach wouldn't be necessary and could be moved
>> to a library function :)
>>
>> The result would look something like: foreach([2, 3, 4, 5]) (int x) {
>> writefln(x); }
>>
>> Probably too big a change though, sadly.
>>
>> Also, let's really move assert into an object.d function. There's _no_
>> reason this should be a keyword.
>>
>>  --downs
> 
> Remove assert and you loose static assert, too.
> Unless, you introduce static_assert keyword :)

This is easy to solve in concept, although possibly hard in actual implementation.

Implement CTFE exceptions :)



More information about the Digitalmars-d mailing list