News for hackers. Stuff that matters.
Re:Teaching Distributed Systems in Go (2013) by Daishiman on Sunday June 01, 2014 @02:56AM (#7828398)
Looking at the reviews and purpose of the class, I wonder why couldn't it be done with Erlang, given that for the tasks they're being asked to do, it should do quite nicely, and though the syntax is unusual, it's a small language that's remarkably simple.
Re:Teaching Distributed Systems in Go (2013) by yodsanklai on Sunday June 01, 2014 @07:22AM (#7828816)
I recently learn a bit of Go and Erlang. Erlang is surprisingly powerful considering how small and simple it is. In particular, I liked the convenience of atoms and pattern matching for writing simple protocols. I'm a little put off by the dynamic typing, it's convenient but very error prone.

On the other hand, Go uses static typing with type inference which is a good compromise between conciseness and safety. And I also much prefer the Go syntax.

Re:Teaching Distributed Systems in Go (2013) by lostcolony on Sunday June 01, 2014 @08:23AM (#7828926)
You can get some of the benefits of static typing using specs and Dialyzer.
Re:Teaching Distributed Systems in Go (2013) by krat0sprakhar on Sunday June 01, 2014 @03:13AM (#7828421)
The professor does mention why he decided not to go ahead with Erlang - I favored going with a c-like systems language because I'm more familiar with it and was less comfortable teaching in Erlang.
Re:Teaching Distributed Systems in Go (2013) by lostcolony on Sunday June 01, 2014 @08:28AM (#7828932)
I always found that kind of surprising. I found it easier to learn new concepts/ways of programming with new syntax. When the syntax feels familiar to a language I already know, I find I either am slipping into habits from the language I know, which may or may not be idiomatic, and which may or may not even do what I think it does, or I just don't bother learn them in the first place, assuming they behave the way they do in the other language.

The sort of extreme example of this is this particular bit of Erlang that seems familiar from a C background

  myFunc(Val) ->
    if Val -> io:format("Val was true", []) end,
    io:format("the end", []).
  
  myFunc(false).
When executed you'd expected it to print just "the end". It doesn't; the if statement throws an exception. It looks similar, but behaves differently, and that makes it harder to learn than the constructs that are completely unfamiliar.