News for hackers. Stuff that matters.
Re:How Good C# Habits can Encourage Bad JavaScript Habits by brc on Thursday October 07, 2010 @09:09PM (#1770193)
I came here to say the same thing : C# makes it intentionally very difficult to create a global variable, and the first example is just a case of sloppy coding, whatever the language. You cannot develop a habit of creating global (or undeclared) variables if you're coming from a C# background.

Similarly, the global namespacing - a C# developer is going to look for ways to declare namespace.definition style, and is not going to spontaneously come up with namespace_definition, as this is an unseen pattern in C# examples and general practice.

Perhaps it would be a good primer for a VB6 -> Javascript developer, but I don't imagine there are too many of those around.

Re:How Good C# Habits can Encourage Bad JavaScript Habits by GFischer on Friday October 08, 2010 @09:56AM (#1771637)
"VB6 -> Javascript developer, but I don't imagine there are too many of those around."

Why not? Some of us are (were) stuck maintaining bad VB6 apps and asp webpages with vbscript that we had to migrate to javascript as Firefox doesn't support vbscript.

I no longer do this, but it paid above average for my country and I was starting out as a developer. And yes, my code probably did suck (heck, it probably still does).