Re:How Good C# Habits can Encourage Bad JavaScript Habits
by pmjordan on Thursday October 07, 2010 @04:43PM
(#1769436)
I found the C# link in the article to be tenuous at best. JavaScript doesn't have namespaces or classes, so yes, obviously you'll need to do without them. Global variables are discouraged in C# - in contrast, uh, avoid global variables in JavaScript? Likewise, I wouldn't call creating objects using a constructor a "best practice" if that's the only way to do it in the language. Besides, there is a time and place for using new, even in JavaScript, mainly for creating functionality-heavy objects with a prototype. (as opposed to data containers)
[ Parent
| on HN ]
There are no comments on this comment yet.