News for hackers. Stuff that matters.
Re:Golang landmines by continuational on Sunday September 18, 2016 @10:40AM (#12525478)
No need to build this into a language. It can be provided as a simple library function:

    with<T>(resource : T, body : T => Void) where T <: Resource

    with(file, f => { ... })
Re:Golang landmines by Animats on Sunday September 18, 2016 @06:11PM (#12527465)
Adding control semantics via library extensions seems to be a thing now. It has a bad history, though, from the extensible languages of the 1970s, when people first discovered that you could do fancy things with macros. That didn't end well.

You don't need many control constructs, and the list is pretty well known, so you may as well design them into the language.

Re:Golang landmines by pjmlp on Sunday September 18, 2016 @12:23PM (#12525859)
Which is yet another reason for a modern language to handle generics.