From: AJ ONeal <coola...@gmail.com>
Date: Sun, 22 Jan 2012 20:57:48 -0700
Local: Sun, Jan 22 2012 10:57 pm
Subject: Re: [nodejs] Re: should issue a warning when "strict mode"; is missing
I'm not saying that, if there is absolutely no possible way to work around Rather, what I'm saying is that you should adhere to the rules first and I realize that test-driven development kind of trains your brain to *This is a 90 / 10 problem.* What percentage of NodeJS developers use Octal? What percentage of JavaScript *users* don't realize that if they forget The question here isn't about the 1% that use these features, it's about *With more power comes more responsibility* I would rather cause disciplined devs like you and me a little grief here If Octal is so important for the NodeJS devs, then add a core module for *It's about the user* Do you see what I'm saying? *Application languages* - JavaScript, ruby, Not wanting workarounds isn't "lazy". I'm pretty sure that if you have > to replace well-written stuff that just works with "workarounds", this If it were well-written, it shouldn't have any issues in strict mode other > is a huge -1 on that change. than the octal change. > > (function () { I'm okay with that. It just looks weird without the indent to me. > > "use strict"; > Without the indent. Please. If I had seen some sort of precedent without the indent, I would have used it that way. > Globals are EVIL. BAD. RUDE. INCONSIDERATE. NASTY. I wish so bad that it were required instead. > > I can't believe I'm hearing support for globals!! > I think you're exaggerating a lot here. What about, for example, It has caused me extra work (albeit minimal) to get some node / npm modules > > I'm being sincere. I thought that everyone in the programming communities I was saying that `goto` takes the place of the decorator pattern in C, > > had gotten the memo that globals and gotos are words you feel dirty > inside > > for using (except in the kernel where you use gotos to implement the > > decorator pattern without the overhead of function calls - and the people > > there are hopefully disciplined enough to not make severe design > mistakes). > Uh? So you're basically saying "globals aren't too bad, but they're since C is a hardware language with a limited feature set, not an application language with wonderful abstractions. The kernel isn't an application. It has a different set of design patterns Applications should not use globals. > > Browser > What about JSONP? You need global functions for that, no? necessary. Welcome CORS and XHR2. :-D I'm not saying that, if there is absolutely no possible way to work around (And actually, I've been considering writing a `window` module for the > > Octals JavaScript is an application laguage. It works just as well on the server > > --- > > I guess since a lot of people on this list work with c++ for native node > > modules it makes sense. > Uh... and e.g. working with the filesystem, too. > > But JavaScript is a high-level language primarily used for interacting > Ah, right, Javascript doesn't belong on the server or so. You're sooo as ruby or python - just a bit better because it handles JSON natively and has a built-in event system. > > Do you know how many times I've been bitten by parsing user input that That's exactly my point. I *want* an application language to hold my hand a > had a > > leading '0' and have scratched my head for too long trying to figure out > > where the math had gone wrong? A lot! (but I'm getting better and > > remembering to check for corner cases that strict mode can't protect me > > from); > Well then, sounds like you're using the wrong tools to parse user little (or at least be intuitive - there should be a parseOct and parseHex - or do you have an argument or using a radix of 3 and 7 as well?). If I wanted to have absolute full control I'd use C. You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||