Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
hderms
· 12y ago · 0 comments
why do people want to avoid using new?
Comments
[–]
LazerBear
12y ago
If you accidentally forget to use 'new' when you're supposed to, the "constructor" method will change the global object instead of a new object, it can cause strange behavior that is very hard to trace.
[–]
hderms
OP
12y ago
Ah, I see. I guess I've never forgotten to use new. That does sound incredibly annoying to debug.