Where should I put a `condp` like function?
Nick Sabalausky
SeeWebsiteToContactMe at semitwist.com
Sun Apr 14 20:46:04 PDT 2013
On Mon, 15 Apr 2013 02:48:27 +0200
"bearophile" <bearophileHUGS at lycos.com> wrote:
> Idan Arye:
>
> > You can't do those things with `switch` because it's a
> > statement.
>
> In various Reddit threads I see people almost angry against the
> statement-expression distinction in contemporary programming
> languages. I am just starting to understand them.
>
I've never seen a big problem with the statement vs expression
distinction, and I think the "statements == expresions" languages
sometimes takes things slightly overboard in the process of forcing them
into the same mold. However, I've *definitely* wished on many
occasions that D's switch could be used as an expression like in Haxe.
More information about the Digitalmars-d
mailing list