Andreas Rossberg (2015-07-14T15:59:38.000Z)
d at domenic.me (2015-07-25T02:53:51.472Z)
On 14 July 2015 at 16:48, Mark S. Miller <erights at google.com> wrote: > Ah. Take a look at my full proposal. The bizarre observation is that > extending the syntax of parens to contain approx a block-body, and > extending its meaning to creating a block-like scope for evaluating that > block-body, in addition to returning a value. In that case, we simply don't > need the "do" expression at all. Don't propose something unnecessarily > complex just because you expect that something simpler would be too > controversial. If it actually is too controversial, that's another matter. I would very much dislike introducing a second syntax for blocks, though -- which is essentially what you are suggesting. Especially when curly braces provide a much better visual clue for the extent of a scope than innocent plain parens do. It's the natural expectation for a C-like language, too. In the design of any modern language the whole notion of block of course is totally obsolete. But JavaScript has its C heritage, and I doubt bolting on something alien would make it a prettier language. > Between Gedanken, Smalltalk, and Actors, almost everything we do in oo > dynamic language design was already conceived right by the early '70s. > Retrofitting without breaking things takes much longer than invention ;) Well, statements vs expressions was already found unnecessary before OO, in the early 60s -- consider Algol 68. (Let alone Lisp, which is late 50s.)