News for hackers. Stuff that matters.
Re:How Good C# Habits can Encourage Bad JavaScript Habits by jiggy2011 on Thursday May 09, 2013 @09:09PM (#5683960)
None of those languages AFAIK (I don't really know C#) will allow you to call a constructor function as anything except a constructor function and constructor functions are always constructors and therefor will always return a new object.

Javascript in it's infinite wisdom will allow one to use any function as a constructor or not. So code the should be obviously wrong will not generate an error or even a warning, this is not something you want from a language. Since we can't change JS , there is merit to the argument that you should change your own code to avoid even possibly having this problem.

Arguments made on the basis of "this is a mistake I am unlikely to make" fill me with skepticism.

Re:How Good C# Habits can Encourage Bad JavaScript Habits by k3n on Thursday May 09, 2013 @10:19PM (#5684161)
You can shoot yourself in the foot in any language....have you ever tried Perl?

Also, if you name your objects and functions like most anyone in CS would suggest, e.g. objects are nouns and functions are verbs, there really shouldn't be a disconnect between the 2 when you need to call them. I am confident that is not a mistake I'll tend to make.

Re:How Good C# Habits can Encourage Bad JavaScript Habits by jiggy2011 on Thursday May 09, 2013 @11:17PM (#5684384)
I would suggest movement in the direction of less foot shooting.