Hacker News new | ask | show | jobs
by grasleya 3286 days ago
I think you can put this more generally as "syntax is not semantics." Go takes some syntactic cues from python (but who doesn't these days?) but its semantics can be pretty different. I think it's pretty common for new programmers especially to get caught up in the syntax of languages without giving enough attention to their semantics, which causes the sort of problems the author highlights here.
1 comments

> I think you can put this more generally as "syntax is not semantics." Go takes some syntactic cues from python (but who doesn't these days?) but its semantics can be pretty different.

Except the difference is not in similar syntax with different semantics; since it's the application of the & operator, which has no close parallel in Python, that is the source of the surprise.