On Mon, 15 Apr 2013 02:48:27 +0200 "bearophile" <bearophileh...@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.