logoalt Hacker News

nmilotoday at 4:07 AM3 repliesview on HN

Implicit context [1] was one of the coolest features of a programming language I’ve ever seen that no one has ever implemented. And I’m really not sure why. Not just Go but most languages have this context passing problem with varying degrees of solution quality, making this implicit and built in could have opened up so many possibilities, more than just arenas.

[1]: https://youtu.be/ciGQCP6HgqI


Replies

rendawtoday at 5:28 AM

Doesn't Scala have this? It sounds like a good idea to me too, but I haven't had a chance to try it for real myself and I've heard other people say it's a bad thing.

But maybe it's like exceptions, where people get involved with a project originally written by people who misused all sorts of language constructs and came away thinking the language was awful, or don't learn idiomatic usage or something.

nasretdinovtoday at 9:02 AM

As someone already mentioned, Odin does have an implicit context, and I do think it's a good idea here. https://odin-lang.org/docs/overview/#parameters

andersmurphytoday at 5:26 AM

Clojure has had dynamic vars since the beginning (2007?). Johnathan probably got it from elisp though.