News for hackers. Stuff that matters.
Re:Zygomys – An embedded scripting language for Go by pron on Thursday December 15, 2016 @07:23AM (#13184083)
Isn't the idea that all mutation must either be local or transactional rather revolutionary? In a sense, Erlang is like that, too, but Clojure took the idea much further. It is pretty clear that that's Clojure's the main idea.
Re:Zygomys – An embedded scripting language for Go by pjmlp on Thursday December 15, 2016 @08:19AM (#13184358)
No, because those ideas can be tracked down to Miranda or even early probably, when digging into enough SIGPLAN papers.

What might be revolutionary is making more "common programmers" aware of them.

Re:Zygomys – An embedded scripting language for Go by pron on Thursday December 15, 2016 @11:26AM (#13185718)
Isn't Miranda pure-functional? Because Clojure is imperative (-functional). Saying you can't mutate is very different from saying you can mutate whatever you like, whenever you like, as long as its transactional or not observable.

And SIGPLAN papers don't really count. A revolutionary product is not the same as a revolutionary idea. Implementing ideas that have never been productized is still revolutionary.

Re:Zygomys – An embedded scripting language for Go by jerf on Thursday December 15, 2016 @09:08AM (#13184610)
Erlang is a fully immutable language. Haskell's more the one where things are either immutable or strictly contained in some scope.
Re:Zygomys – An embedded scripting language for Go by pron on Thursday December 15, 2016 @11:35AM (#13185803)
If I'm not mistaken, ETS tables allow the same kind of mutation as Clojure's atoms -- i.e., they are atomic, but still mutations. Haskell is pure-functional, which is something very different from the functional-imperative Clojure and Erlang.
Re:Zygomys – An embedded scripting language for Go by jerf on Thursday December 15, 2016 @02:11PM (#13187245)
"If I'm not mistaken, ETS tables allow the same kind of mutation as Clojure's atoms"

ETS tables are usually out-of-(Erlang-)process. You are sending messages to them to update them and query them, and those processes are each functional, so it's still functional. IIRC there's a mode where it runs "in process" with you, but it's still conceptually behind the same interface. (Which raises interesting questions about what exactly is "mutable" or "not mutable", which IMHO ultimately get best answered by Rust.)

What Erlang is not is pure. You can query an ETS table, send it a command to mutate, then run the exact same query again and get a difference response. The message passing makes things impure, even though every individual component of the system is immutable-functional. And there are some other impure functions in Erlang as well, of course, like the functions to get the current time, but the message passing is in some sense the fundamental introduction of impurity at the architectural level.

Re:Zygomys – An embedded scripting language for Go by pron on Thursday December 15, 2016 @04:00PM (#13188344)
> The message passing makes things impure, even though every individual component of the system is immutable-functional.

That's how you think about it, but allowing mutation and allowing blocking interaction with processes are exactly the same, as blocking interaction with processes is the same having as continuations, and continuations alone are all you need for mutation, even if you imagine things to be immutable. Like monads, continuations are a universal effect. An otherwise pure language with continuations is indistinguishable from an imperative language, i.e., it is imperative.

Both Clojure and Erlang are functional-imperative languages, but unlike other imperative-functional languages (like ML), they have been designed with concurrency in mind, and the mutations they support are transactional (or at least atomic(.