[Issue 5906] Just pre-conditions at compile-time when arguments are static

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 25 03:04:12 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=5906


Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla at digitalmars.com


--- Comment #2 from Walter Bright <bugzilla at digitalmars.com> 2012-12-25 03:03:59 PST ---
Right now, there's a clear distinction between compile time and run time
computation. For the canonical example:

    assert(0);

We certainly do not want to run that at compile time, because it's only
supposed to fail if control flow reaches there. For compile time, we've got:

    static assert(0);

which only runs at compile time.

>From my POV, the "run it at compile time if possible" is fraut with problems.
There's so much in D that relies on, for example, *failing* to compile an
expression, that having a wishy-washy construct like the proposal raises a big
flag of "there be dragons".

I'm strongly opposed to this proposal.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list