On Friday, July 21, 2017 17:32:48 Andrei Alexandrescu via Digitalmars-d wrote: > On 07/19/2017 09:30 AM, sontung wrote: > [snip] > > This post: > http://forum.dlang.org/post/[email protected] seems > to be identical to one on November 3, 2016: > http://forum.dlang.org/post/[email protected]. > > Hat tip for persistence! > > Regarding the feature itself: it seems to be fancied by the new > languages, and C++ added it, too. I must be old school because I don't > see much benefit in it, and don't quite find it natural. It's bizarre > even lexically: "If the following ... oh wait let me insert some stuff > ... as I was saying, if the following condition happens..." Conversely, > I find the let/letrec syntax in functional languages a bit more convivial.
I would have thought that it was a fairly obvious extension given how for loops work (especially since you can already declare variables in if statements; you just can't do it and then use something else for the condition), and it's less verbose than doing something with with, though I suppose that getting with to work like this would be better than nothing. It does seem unnecessarily verbose in comparison though. - Jonathan M Davis
