We use a global namespace and use it in the following way var myNameSpace = myNameSpace || {}; myNameSpace.myFunct = function () {...}; ... -- Toby...
2719
Brennan
gurunannerb
Jan 5, 2012 2:07 pm
I am posting here with some trepidation, and I am thoroughly expecting to be insulted by DC. Here goes anyway. "The Good Parts" Appendix A5 (Awful parts)...
2720
douglascrockford
douglascrock...
Jan 5, 2012 2:26 pm
... There is confusion beyond the ASCII set. There are codes with identical or similar glyphs. A correct program can be indistinguishable from an incorrect...
2721
Tom Worster
thefsb
Jan 5, 2012 2:54 pm
I like to program in Unicode (☭ = ☃ + π;) but I accept that there can be difficulties. One question is what collation JS should use to decide equivalence...
2722
douglascrockford
douglascrock...
Jan 5, 2012 7:22 pm
... All JavaScript sees is raw code points, so identifiers that look the same may be different identifiers....
2723
dcherman1
Jan 5, 2012 7:47 pm
Porting this feature request over from Github issues: I don't know what your views are on modifying Object.prototype, but I'm sure you've heard all the...
2724
douglascrockford
douglascrock...
Jan 5, 2012 9:19 pm
... There are times when modifying Object.prototype is a smart thing to do. But it is usually a bad thing for applications to do. And I think that assuming...
2725
dcherman1
Jan 5, 2012 11:34 pm
It really depends on what you want the scope of JSLint to be. As I said in the original post, some libs ( again, specifically jQuery comes to mind ) that do...
2726
Michael Mikowski
z_mikowski
Jan 6, 2012 12:52 am
This seems like a valuable inclusion, IMO. ________________________________ From: dcherman1 <daniel.c.herman@...> To: jslint_com@yahoogroups.com Sent:...
2727
Joshua Bell
inexorabletash
Jan 6, 2012 4:32 pm
... A Globalization API for JavaScript is under consideration on es-discuss, for implementation by browser vendors as host objects and/or inclusion in the next...
2728
Joshua Bell
inexorabletash
Jan 6, 2012 4:43 pm
... ... and to expound on Crockford's point on the other fork of this thread (mea culpa!), the above proposal assumes no changes to the ECMAScript language...
2729
douglascrockford
douglascrock...
Jan 6, 2012 5:30 pm
... JSMin likes UTF-8....
2730
Tom Worster
thefsb
Jan 6, 2012 6:02 pm
... Meaning that one script such as öle = olé + 3; does different things in different countries? öle = olé + 3; This is done with new objects/functions ......
2731
Luke Page
page.luke...
Jan 6, 2012 8:51 pm
For a real world example, I've seen a bug where an identifier had a с (crylic c) in it written by a russian coder which looked in most fonts the same as c.. ...
2732
douglascrockford
douglascrock...
Jan 6, 2012 9:26 pm
... What are you trying to say? You gave us clear evidence of why it shouldn't accept both Cyrillic and Latin. So are you arguing that JSLint should only...
2733
Luke Page
page.luke...
Jan 6, 2012 9:39 pm
I'm arguing in favour of the current situation.. for myself, working in English. I should have let someone else for whom it is of benefit argue for anything ...
2734
Rob Richardson
erobrich@...
Jan 7, 2012 8:53 am
+1 ... From: jslint_com@yahoogroups.com [mailto:jslint_com@yahoogroups.com] On Behalf Of Michael Mikowski Sent: Thursday, January 05, 2012 5:52 PM To:...
2735
Rob Richardson
erobrich@...
Jan 7, 2012 8:53 am
Programming in general is done in English. I'm sorry to be the dumb American, but that's pretty much how it works. I've heard from many international...
2736
cse_html_validator
cse_html_val...
Jan 16, 2012 2:30 pm
It seems JSLint cannot check an HTML document if there is an HTML comment at the beginning of the document. Can this be fixed or is there a way around it? For...
2737
Martin Cooper
mfncooper
Jan 16, 2012 3:51 pm
... The DOCTYPE must be the very first thing in the document, so a comment before the DOCTYPE is not valid. -- Martin Cooper...
2738
Mark Volkmann
mark_volkmann
Jan 16, 2012 3:58 pm
... It is valid according to the HTML spec., but IE doesn't like it. See http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html and ...
2739
spence.randall@...
spence.randa...
Jan 18, 2012 5:40 am
Given the following example code: function test(x) { ~~~~'use strict'; ~~~~return x === 1 ? 'one' : ~~~~~~~~x === 2 ? 'two' : ~~~~~~~~~~~~x === 3 ? 'three39; : ...
2740
Rob Richardson
erobrich@...
Jan 18, 2012 12:56 pm
A comment before the DOCTYPE sends all versions of IE into quirks mode, defeating the purpose of the doctype you've specified. See ...
2741
douglascrockford
douglascrock...
Jan 18, 2012 12:57 pm
... I would right it this way: function test(x) { ~~~~'use strict'; ~~~~return x === 1 ~~~~~~~~? 'one' ~~~~~~~~: x === 2 ~~~~~~~~? 'two' ~~~~~~~~: x === 3 ...
2742
douglascrockford
douglascrock...
Jan 18, 2012 1:03 pm
... I would write it this way: function test(x) { ~~~~'use strict'; ~~~~return x === 1 ~~~~~~~~? 'one' ~~~~~~~~: x === 2 ~~~~~~~~? 'two' ~~~~~~~~: x === 3 ...
2743
Satyam
satyamutsa
Jan 18, 2012 1:11 pm
... If both the 'if' part and the 'else' part had nested expressions, having all in the same indentation level would be confusing. This example has all the...
2744
Rob Richardson
erobrich@...
Jan 18, 2012 4:03 pm
... ~~~~'use strict'; ~~~~return x === 1 ~~~~~~~~? 'one' ~~~~~~~~: x === 2 ~~~~~~~~? 'two' ~~~~~~~~: x === 3 ~~~~~~~~? 'three39; ~~~~~~~~: x === 4 ~~~~~~~~?...
2745
douglascrockford
douglascrock...
Jan 18, 2012 4:37 pm
... case is not a statement. It is a switch level. You should take JSLint's advice....
2746
spence.randall@...
spence.randa...
Jan 18, 2012 4:44 pm
... Thanks Rob, I agree switch makes more sense, but the question was on the indention expected, not the function itself. I just quickly created that one to...
2747
Vardhan,Sree
vardhantrav
Jan 18, 2012 4:57 pm
Dear Vendor, Please provide an update on ECCN for the product JSLint. Thanks, Sree OAI-sys, Application Development and Testing Tools Travelers Insurance. HPSM...