Hacker News new | ask | show | jobs
by efdee 1355 days ago
It takes a special kind of human to name variable "name" but not have it be a string.
3 comments

Something like

  name = {first: "Jane", last: "Doe"}
isn't obviously unreasonable. Which actually sets name to the string "[object Object]".
Falsehoods programming languages believe about names.
I work with such humans! I was looking at that exact situation a few moments ago.
I can imagine someone doing this if they were using "name" as a verb