News for hackers. Stuff that matters.
Re:Solving the Go Challenge 1 in Erlang by digitalzombie on Thursday March 19, 2015 @10:06PM (#9235889)
I wish there was more explanation with the = sign in Erlang. In that it's not an assignment but a pattern match first.

IIRC, it pattern match first and if the variable is not assign then it'll assign it IIRC. The code and explanation just state that it's Erlang to do assertion.

I think that's an interesting concept at least when I play with Erlang.

Re:Solving the Go Challenge 1 in Erlang by krzysz00 on Thursday March 19, 2015 @11:12PM (#9236057)
I guess one interpretation of Erlang's = (this is from someone rather new to the language) is "Make the thing on the left equal to the thing on the right without mutating existing variables. If that's impossible, error". That nicely accounts for the apparent dual nature of the = operator.
Re:Solving the Go Challenge 1 in Erlang by wwweston on Friday March 20, 2015 @04:43AM (#9236675)
I don't know Erlang, but I have done some Prolog and this sounds an awful lot like unification of an equality predicate.
Re:Solving the Go Challenge 1 in Erlang by raphaelss on Friday March 20, 2015 @05:03AM (#9236715)
Erlang has some roots in Prolog. Its initial version was actually implemented in Prolog.
Re:Solving the Go Challenge 1 in Erlang by jlouis on Friday March 20, 2015 @06:02AM (#9236836)
It is unification to a certain extent, but unification is slightly different IIRC the semantics correctly.