On 4/29/12, Andrej Mitrovic <andrej.mitrov...@gmail.com> wrote:
> But it does allow for some neat tricks

See, this is in RABCDAsm:

auto pvalue = name in vars;
if (pvalue is null)
    throw new Exception("variable " ~ name ~ " is not defined");
string value = *pvalue;

And it can be replaced with one line of code:

string value = *enforce(name in vars, "variable " ~ name ~ " is not defined");

Reply via email to