Hacker News new | ask | show | jobs
by fedesilva 4643 days ago
"And if you screw up or forget to change it, your local modifications to the object are silently ignored. "

Since I started writing Scala I got used to immutable data and the reverse happens to me when coding in imperative style in other langs; that I pass something and it gets "locally modified" feels awkward. Preposterous even.

Regarding Go and the "also the anti-Java" part: I really don't think so.

They have made some decisions that seem to me a reaction to c++ and that at least is similar to Java. Some of them seem simplistic not simple: for example "There is no inheritance!" (one one one) but I really don't know how implicit structural subtyping will work out in the long run.

What I really envy from Go is the "compile and link to one executable" from an ops point of view.

Time will tell.

[Edited to add envy part, and rewrite a phrase]

1 comments

I actually really like immutable data - I was (and still am, when I don't have to get work done) a big fan of Haskell. The problematic part is when you have a language that encourages an imperative programming style, and yet passing an object by value is only one character off from passing it by reference.
[Disregard, I read your post again after a coffee and in a normal screen. Sorry]

I don't understand "yet passing an object by value is only one character off from passing it by reference".

Is that Go?