News for hackers. Stuff that matters.
Re:Show HN: 15-question programming quiz with answers by vitno on Tuesday May 23, 2017 @01:20PM (#14403083)
they didn't say syntax, they said Python idiosyncrasies. Knowing move/copy rules in python counts as that. It's something that isn't intuitive unless you know python, ex: the matrix question. An experienced dev who isn't a python person would pick the intuitive choice, see the matrix is malformed, then Google how to clone objects in python.
Re:Show HN: 15-question programming quiz with answers by safek on Tuesday May 23, 2017 @01:22PM (#14403102)
On the other hand, how many languages do you know where arrays are passed by value?
Re:Show HN: 15-question programming quiz with answers by macintux on Tuesday May 23, 2017 @02:20PM (#14403748)
My primary language (Erlang) does. I assume all functional programming languages do.
Re:Show HN: 15-question programming quiz with answers by safek on Tuesday May 23, 2017 @03:37PM (#14404497)
That's true. I suppose my next argument is that seeing matrix.append(row) on its own line signals strongly that this is not a functional language.
Re:Show HN: 15-question programming quiz with answers by thedufer on Tuesday May 23, 2017 @07:07PM (#14406215)
Is that true? I thought most functional programming languages did call-by-reference. I mean, if you have immutable data you can't tell the difference (outside of performance).
Re:Show HN: 15-question programming quiz with answers by macintux on Wednesday May 24, 2017 @12:32AM (#14407632)
Under the hood it's probably by reference, but the semantics are by value. By reference indicates that the original value can be changed in the called function.

I think. Not a language lawyer.

Re:Show HN: 15-question programming quiz with answers by echevil on Tuesday May 23, 2017 @01:39PM (#14403279)
lol, the same mistake can be made in a lot more languages~