short thoughts on D (like my twitter)
Nick Sabalausky
a at a.a
Fri Jun 10 12:21:53 PDT 2011
"Adam D. Ruppe" <destructionator at gmail.com> wrote in message
news:istja4$1rua$1 at digitalmars.com...
> http://arsdnet.net/web.d/short-thoughts.html
>
> So I've decided to make one page where I'll dump them from time to
> time, like a twitter, but not twitter because twitter sucks.
>
Heh, this quote wins teh intarnets. :) I've done the exact same thing with
"blogging". I *don't* have a blog, blogs are stupid bullshit. But I do have
something that just happens to arguably be a lot like a blog and uses a
blogging engine ;)
>
> I started with something I just found pretty cool: using
> to!enum("string") does super easy whitelisting of input! And, IFTI
> lets you avoid repeating yourself if you want a default value.
It'd be better if there were just some sort of variant of "to" that
indicated failure some other way (and "to" could be built out of it.) That
way you wouldn't have to have the overhead of instantiating an exception
(and any other throw/catch overhead there may or may not be) every time you
have to use the default.
More information about the Digitalmars-d-announce
mailing list