Hey, I've got a question about self invoking functions in javascript.
What I'm doing is something similar to the following
myNamespace = {}; //namespace for holding any objects/functions
//helpModule as an example
myNamespace.HelpModule = new (function(){
this.abc = '123';
//lots of other code in here...
return this;
})();
However jsLint doesn't like that saying "Weird construction. Delete
'new'.".
But it seems to work fine, and the reason I'm using it is to have
"this" scope to the function instead of the window. I could just
define it as an object literal or do something similar to
myNamespace.HelpModule = (function(){
var obj = {};
obj.abc = '123';
return obj;
}();
but for some reason I like having the 'this' keyword
|
|
0
|
|
|
|
Reply
|
imjesse (1)
|
7/30/2010 12:39:57 AM |
|
On Jul 29, 8:39=A0pm, Jesse <imje...@gmail.com> wrote:
> Hey, I've got a question about self invoking functions in javascript.
>
> What I'm doing is something similar to the following
>
> myNamespace =3D =A0{}; //namespace for holding any objects/functions
It's just an object and your code would be clearer without the
comment.
>
> //helpModule as an example
> myNamespace.HelpModule =3D new (function(){
> =A0 =A0 this.abc =3D '123';
> =A0 =A0 //lots of other code in here...
> =A0 =A0 return this;
>
> })();
Lose the - new - keyword, refactor.
>
> However jsLint doesn't like that saying "Weird construction. Delete
> 'new'.".
I heartily agree with Douglas on that one. :)
>
> But it seems to work fine, and the reason I'm using it is to have
> "this" scope to the function instead of the window.
Not the window, the Global Object.
> I could just
> define it as an object literal or do something similar to
>
> myNamespace.HelpModule =3D (function(){
> =A0 =A0 var obj =3D {};
> =A0 =A0 obj.abc =3D '123';
>
> =A0 =A0 return obj;
>
> }();
>
> but for some reason I like having the 'this' keyword
Why? It's a very awkward construct.
|
|
0
|
|
|
|
Reply
|
David
|
7/30/2010 12:46:07 AM
|
|
On Jul 30, 10:39 am, Jesse <imje...@gmail.com> wrote:
> Hey, I've got a question about self invoking functions in javascript.
>
> What I'm doing is something similar to the following
>
> myNamespace = {}; //namespace for holding any objects/functions
>
> //helpModule as an example
> myNamespace.HelpModule = new (function(){
> this.abc = '123';
> //lots of other code in here...
> return this;
> })();
All that seems to do is put an extra (useless) object on the returned
object's internal prototype chain. There is no need for the return
statement, functions called with - new - return their this object by
default. A weird construct indeed.
> However jsLint doesn't like that saying "Weird construction. Delete
> 'new'.".
>
> But it seems to work fine, and the reason I'm using it is to have
> "this" scope to the function instead of the window. I could just
A function's this keyword has nothing to do with scope, it is a
reference to an object. It is set by the call to the function, you
can't control it by how you create the function other than by limiting
how it is called.
> define it as an object literal
Do that - hey look, less code!
var myNamespace = {
HelpModule: {
abc: '123'
}
};
> or do something similar to
>
> myNamespace.HelpModule = (function(){
> var obj = {};
> obj.abc = '123';
>
> return obj;
> }();
Which is essentially wrapping an object literal in a function that
just returns the object and possibly creates useless closures. If you
want to use closures for a specific purpose, use the module pattern
(see below). Otherwise why call a function when an object literal will
do the job (and probably do it faster)?
var myNamespace = (function() {
var closedVar_1 = '123';
return {
helpModule: {
getVar_1: function() {
return closedVar_1;
},
setVar_1: function(value) {
closedVar_1 = value;
return closedVar_1;
}
}
}
})();
You may want to read the following blog entry by Peter Michaux:
<URL: http://peter.michaux.ca/articles/javascript-namespacing >
> but for some reason I like having the 'this' keyword
So it's a fashion statement? ;-)
I think Peter gives some good reasons for avoiding the this keyword
with namespaces (in short, because you can't guarantee how a function
will be called so you can't be sure you know what its this keyword
will reference) and provides some alternative strategies.
--
Rob
|
|
0
|
|
|
|
Reply
|
RobG
|
7/30/2010 3:38:48 AM
|
|
On Jul 29, 11:38=A0pm, RobG <rg...@iinet.net.au> wrote:
> On Jul 30, 10:39 am, Jesse <imje...@gmail.com> wrote:
>
> > Hey, I've got a question about self invoking functions in javascript.
>
> > What I'm doing is something similar to the following
>
> > myNamespace =3D =A0{}; //namespace for holding any objects/functions
>
> > //helpModule as an example
> > myNamespace.HelpModule =3D new (function(){
> > =A0 =A0 this.abc =3D '123';
> > =A0 =A0 //lots of other code in here...
> > =A0 =A0 return this;
> > })();
>
> All that seems to do is put an extra (useless) object on the returned
> object's internal prototype chain. There is no need for the return
> statement, functions called with - new - return their this object by
> default. A weird construct indeed.
>
> > However jsLint doesn't like that saying "Weird construction. Delete
> > 'new'.".
>
> > But it seems to work fine, and the reason I'm using it is to have
> > "this" scope to the function instead of the window. I could just
>
> A function's this keyword has nothing to do with scope, it is a
> reference to an object. It is set by the call to the function, you
> can't control it by how you create the function other than by limiting
> how it is called.
Thanks for picking that up. Somehow I missed that offending use of
the term. It seems to be so pervasive that virtually every developer
who uses the "major" libraries thinks that scope is the - this -
object; which leaves the question of what they would call the concept
of scope (if they are even aware of the concept).
>
> > define it as an object literal
>
> Do that - hey look, less code!
>
> var myNamespace =3D {
> =A0 HelpModule: {
> =A0 =A0 abc: '123'
> =A0 }
>
> };
That's ideal, but I think they were implying that there would be lots
more inside the one-off function.
> > or do something similar to
>
> > myNamespace.HelpModule =3D (function(){
> > =A0 =A0 var obj =3D {};
> > =A0 =A0 obj.abc =3D '123';
>
> > =A0 =A0 return obj;
> > }();
>
> Which is essentially wrapping an object literal in a function that
> just returns the object and possibly creates useless closures. If you
> want to use closures for a specific purpose, use the module pattern
> (see below). Otherwise why call a function when an object literal will
> do the job (and probably do it faster)?
>
> var myNamespace =3D (function() {
>
> =A0 var closedVar_1 =3D '123';
>
> =A0 return {
> =A0 =A0 helpModule: {
> =A0 =A0 =A0 getVar_1: function() {
> =A0 =A0 =A0 =A0 return closedVar_1;
> =A0 =A0 =A0 },
>
> =A0 =A0 =A0 setVar_1: function(value) {
> =A0 =A0 =A0 =A0 closedVar_1 =3D value;
> =A0 =A0 =A0 =A0 return closedVar_1;
> =A0 =A0 =A0 }
> =A0 =A0 }
> =A0 }
>
> })();
>
> You may want to read the following blog entry by Peter Michaux:
>
> <URL:http://peter.michaux.ca/articles/javascript-namespacing>
>
> > but for some reason I like having the 'this' keyword
>
> So it's a fashion statement? ;-)
This is the new that. :)
>
> I think Peter gives some good reasons for avoiding the this keyword
> with namespaces (in short, because you can't guarantee how a function
> will be called so you can't be sure you know what its this keyword
> will reference) and provides some alternative strategies.
>
Yes, if a "namespace" object is simply a container for various
functions (to keep the global scope clean), then there is no reason to
rewrite the functions as methods.
This helps with both performance and minification as well as you can
set local references to the functions in the calling code. Those are
two reasons why I went this way with My Library.
I went a long way toward converting Dojo (in my branch) to this
strategy as well. Unfortunately, they decided to un-declare their
global variables instead (ostensibly to make their pervasive lookups
faster). I tried to tell them. :)
Most of the "majors" go all out the other way and constantly reference
their own "namespace" inside of even the most basic functions, which
slows things down and impedes minification.
|
|
0
|
|
|
|
Reply
|
David
|
7/30/2010 3:59:47 AM
|
|
On Thu, 29 Jul 2010 at 17:46:07, in comp.lang.javascript, David Mark
wrote:
>On Jul 29, 8:39�pm, Jesse <imje...@gmail.com> wrote:
>> Hey, I've got a question about self invoking functions in javascript.
>>
>> What I'm doing is something similar to the following
>>
>> myNamespace = �{}; //namespace for holding any objects/functions
>
>It's just an object and your code would be clearer without the
>comment.
<snip>
It's an object used to implement a namespace (by hand, as is common in
javascript).
There *should* be a short comment. It should say briefly what this
global variable is for, to be read by maintenance programmers in two
year's time.
What's wrong is the name. When Jesse's code and Jim's code is merged
next year then Jesse's myNameSpace and Jim's myNameSpace will clash
horribly. Also it's far too long to be written many, many times.
John
--
John Harris
|
|
0
|
|
|
|
Reply
|
John
|
7/31/2010 4:58:36 PM
|
|
On Jul 31, 12:58=A0pm, John G Harris <j...@nospam.demon.co.uk> wrote:
> On Thu, 29 Jul 2010 at 17:46:07, in comp.lang.javascript, David Mark
> wrote:>On Jul 29, 8:39=A0pm, Jesse <imje...@gmail.com> wrote:
> >> Hey, I've got a question about self invoking functions in javascript.
>
> >> What I'm doing is something similar to the following
>
> >> myNamespace =3D =A0{}; //namespace for holding any objects/functions
>
> >It's just an object and your code would be clearer without the
> >comment.
>
> =A0 <snip>
>
> It's an object used to implement a namespace (by hand, as is common in
> javascript).
Yes.
>
> There *should* be a short comment. It should say briefly what this
> global variable is for, to be read by maintenance programmers in two
> year's time.
The comment seems superfluous to me, particularly due to the name of
the variable, which seems to be self-documenting enough.
>
> What's wrong is the name. When Jesse's code and Jim's code is merged
> next year then Jesse's myNameSpace and Jim's myNameSpace will clash
> horribly.
> Also it's far too long to be written many, many times.
>
The number of characters typed is never a concern (use an editor with
macros). And in the case of global "namespaces" they shouldn't need
to be written many times (if you do, you are likely writing slow code
that will minify poorly).
|
|
0
|
|
|
|
Reply
|
David
|
7/31/2010 9:42:24 PM
|
|
On Sat, 31 Jul 2010 at 14:42:24, in comp.lang.javascript, David Mark
wrote:
<snip>
>The number of characters typed is never a concern (use an editor with
>macros).
No thank you. Some of us are allergic to numerous control codes. They're
for geeks who want to boast about remembering them.
>And in the case of global "namespaces" they shouldn't need
>to be written many times (if you do, you are likely writing slow code
>that will minify poorly).
So you reject the Math object, and would never write a javascript
application that uses lots of mathematical functions.
John
--
John Harris
|
|
0
|
|
|
|
Reply
|
John
|
8/1/2010 4:41:50 PM
|
|
On Aug 1, 12:41=A0pm, John G Harris <j...@nospam.demon.co.uk> wrote:
> On Sat, 31 Jul 2010 at 14:42:24, in comp.lang.javascript, David Mark
> wrote:
>
> =A0 <snip>
>
> >The number of characters typed is never a concern (use an editor with
> >macros).
>
> No thank you. Some of us are allergic to numerous control codes. They're
> for geeks who want to boast about remembering them.
Who needs macros anyway? It was just an example. Many editors
provide auto-complete features. Furthermore, if you can remember Ctrl
+C and Ctrl+V you are golden. ;)
>
> >And in the case of global "namespaces" they shouldn't need
> >to be written many times (if you do, you are likely writing slow code
> >that will minify poorly).
>
> So you reject the Math object, and would never write a javascript
> application that uses lots of mathematical functions.
>
No, the built-in Math object is not a global "namespace".
|
|
0
|
|
|
|
Reply
|
David
|
8/1/2010 11:00:50 PM
|
|
On Aug 2, 11:00=A0am, David Mark <dmark.cins...@gmail.com> wrote:
> On Aug 1, 12:41=A0pm, John G Harris <j...@nospam.demon.co.uk> wrote:
>
> > On Sat, 31 Jul 2010 at 14:42:24, in comp.lang.javascript, David Mark
> > wrote:
>
> > =A0 <snip>
>
> > >The number of characters typed is never a concern (use an editor with
> > >macros).
>
> > No thank you. Some of us are allergic to numerous control codes. They'r=
e
> > for geeks who want to boast about remembering them.
>
> Who needs macros anyway? =A0It was just an example. =A0Many editors
> provide auto-complete features. =A0Furthermore, if you can remember Ctrl
> +C and Ctrl+V you are golden. =A0;)
>
>
>
> > >And in the case of global "namespaces" they shouldn't need
> > >to be written many times (if you do, you are likely writing slow code
> > >that will minify poorly).
>
> > So you reject the Math object, and would never write a javascript
> > application that uses lots of mathematical functions.
>
> No, the built-in Math object is not a global "namespace".
Thanks for the comments and criticisms :)
Unfortunately I didn't study computer science while at university and
have just picked up programming over the years. So I just wanted to
see if there was something wrong with using that pattern, or is it a
construct? ( these are the sorts of things I now wish I'd learnt while
at Uni)
I wanted to know if it was bad performance-wise, confusing for other's
reading it, or some other implications
>It's just an object and your code would be clearer without the
>comment.
The comments were the for example's sake
>The comment seems superfluous to me, particularly due to the name of
>the variable, which seems to be self-documenting enough.
As with the comments this was only named myNamespace for the example.
We use the name of the company which is pretty unique so very unlikely
to clash with anyone else's namespace
|
|
0
|
|
|
|
Reply
|
Jesse
|
8/1/2010 11:37:29 PM
|
|
On Aug 1, 7:00=A0pm, David Mark <dmark.cins...@gmail.com> wrote:
> On Aug 1, 12:41=A0pm, John G Harris <j...@nospam.demon.co.uk> wrote:
>
> > On Sat, 31 Jul 2010 at 14:42:24, in comp.lang.javascript, David Mark
> > wrote:
>
> > =A0 <snip>
>
> > >The number of characters typed is never a concern (use an editor with
> > >macros).
>
> > No thank you. Some of us are allergic to numerous control codes. They'r=
e
> > for geeks who want to boast about remembering them.
>
> Who needs macros anyway? =A0It was just an example. =A0Many editors
> provide auto-complete features. =A0Furthermore, if you can remember Ctrl
> +C and Ctrl+V you are golden. =A0;)
>
And as for globals, you could peck away for hours using "A" in lieu of
whatever is deemed too typing intensive and then do a global replace
on "A.".
Typing should never be a consideration when naming variables or
properties. And typing the name of a global "namespace" over and over
indicates that inefficiencies are piling up (both in terms of
performance and size).
Math was mentioned as a counter-example (though it is not a global
variable). I suppose you could create local references to its methods
as well, but I'd have to check the specs to be sure that indirect
calls are allowed for all of them.
|
|
0
|
|
|
|
Reply
|
David
|
8/2/2010 7:26:59 AM
|
|
On Mon, 2 Aug 2010 at 00:26:59, in comp.lang.javascript, David Mark
wrote:
<snip>
>Math was mentioned as a counter-example (though it is not a global
>variable).
<snip>
Math is a property of the global object. The global object is the
variable object for global vars and functions. Math is accessible from
everywhere.
It's global and it's indistinguishable from a variable. It can only be
'not a global variable' with some weird and unnecessary definition of
global variable.
John
--
John Harris
|
|
0
|
|
|
|
Reply
|
John
|
8/3/2010 7:21:53 PM
|
|
On Aug 3, 3:21=A0pm, John G Harris <j...@nospam.demon.co.uk> wrote:
> On Mon, 2 Aug 2010 at 00:26:59, in comp.lang.javascript, David Mark
> wrote:
>
> =A0 <snip>>Math was mentioned as a counter-example (though it is not a gl=
obal
> >variable).
>
> =A0 <snip>
>
> Math is a property of the global object.
Doesn't that go without saying?
> The global object is the
> variable object for global vars and functions. Math is accessible from
> everywhere.
And that.
>
> It's global and it's indistinguishable from a variable.
It is certainly not indistinguishable from a variable.
> It can only be
> 'not a global variable' with some weird and unnecessary definition of
> global variable.
That's nonsense.
|
|
0
|
|
|
|
Reply
|
David
|
8/4/2010 7:58:32 AM
|
|
On Wed, 4 Aug 2010 at 00:58:32, in comp.lang.javascript, David Mark
wrote:
>On Aug 3, 3:21�pm, John G Harris <j...@nospam.demon.co.uk> wrote:
<snip>
>> It's global and it's indistinguishable from a variable.
>
>It is certainly not indistinguishable from a variable.
How so ?
>> It can only be
>> 'not a global variable' with some weird and unnecessary definition of
>> global variable.
>
>That's nonsense.
What is your reasoning ?
John
--
John Harris
|
|
0
|
|
|
|
Reply
|
John
|
8/4/2010 10:28:03 AM
|
|
John G Harris <john@nospam.demon.co.uk> writes:
> On Wed, 4 Aug 2010 at 00:58:32, in comp.lang.javascript, David Mark
> wrote:
>>On Aug 3, 3:21�pm, John G Harris <j...@nospam.demon.co.uk> wrote:
>
> <snip>
>>> It's global and it's indistinguishable from a variable.
>>
>>It is certainly not indistinguishable from a variable.
>
> How so ?
Well, it depends on what a (global) variable is. Let's for a moment
assume it's something declared using "var" or "function" in the global
scope.
In that case, Math is distinguishable by not being enumerable, whereas
variables are enumerable.
Math can also be deleted (it's configurable), and normal variables
aren't. However, variables introduced using global.eval("var x;")
are actually configurable, and should be considered variables too.
Now, one could also say that this artificial distinction is crap,
and Math acts in every reasonable way as a global variable. And
if it walks like a ducke and quacks like a duck, it must be a
witch^H^H^H^H^Hduck.
>>> It can only be
>>> 'not a global variable' with some weird and unnecessary definition of
>>> global variable.
>>
>>That's nonsense.
Is not! Is so!
> What is your reasoning ?
Probably "If I not say this is a variable, this not be a variable!" :P
More seriously, what is needed isn't the reasoning, but just stating
what it means to be "a global variable". After that, it's a matter
of reading to spec to see if Math is one or not, or possibly just
disagreeing with the defintion.
/L
--
Lasse Reichstein Holst Nielsen
'Javascript frameworks is a disruptive technology'
|
|
0
|
|
|
|
Reply
|
Lasse
|
8/4/2010 3:36:28 PM
|
|
On Wed, 4 Aug 2010 at 17:36:28, in comp.lang.javascript, Lasse
Reichstein Nielsen wrote:
>John G Harris <john@nospam.demon.co.uk> writes:
<snip>
>> How so ?
>
>Well, it depends on what a (global) variable is. Let's for a moment
>assume it's something declared using "var" or "function" in the global
>scope.
Let's for ever assume it's anything held in a variable object.
Then you can introduce a classification of variables :
Var variables
(with sub-classes declared, implicit)
Function declaration variables
Predefined variables
(with sub-classes primitive, function object, other object)
<snip>
>> What is your reasoning ?
>
>Probably "If I not say this is a variable, this not be a variable!" :P
>More seriously, what is needed isn't the reasoning, but just stating
>what it means to be "a global variable". After that, it's a matter
>of reading to spec to see if Math is one or not, or possibly just
>disagreeing with the defintion.
ECMA262 doesn't define 'variable'.
Are you bidding to be the second PointedEars ?
John
--
John Harris
|
|
0
|
|
|
|
Reply
|
John
|
8/4/2010 7:55:00 PM
|
|
On Aug 4, 6:28=A0am, John G Harris <j...@nospam.demon.co.uk> wrote:
> On Wed, 4 Aug 2010 at 00:58:32, in comp.lang.javascript, David Mark
> wrote:
>
> >On Aug 3, 3:21=A0pm, John G Harris <j...@nospam.demon.co.uk> wrote:
>
> =A0 <snip>
>
> >> It's global and it's indistinguishable from a variable.
>
> >It is certainly not indistinguishable from a variable.
>
> How so ?
Did you declare it in your code? If so, it's a variable. If not,
it's not. And yes, I am using the term "declare" loosely. Named
arguments and function expressions (the latter of which should be
avoided) count.
The only gray area would be implied global "variables", which are used
without declaration and create properties on the Global Object (which
differ slightly from those created by properly declared global
variables).
Built-in objects, host objects, etc. are not variables. Calling them
as such serves only to create confusion (and there is enough of that
as it is).
|
|
0
|
|
|
|
Reply
|
David
|
8/8/2010 5:08:07 AM
|
|
On Aug 8, 7:08=A0am, David Mark <dmark.cins...@gmail.com> wrote:
> (...) Named
> arguments and function expressions (the latter of which should be
> avoided) (...)
NFEs ? Avoided ? Why ? NFEs are *not* the problem, the problem is
Microsoft.
> The only gray area would be implied global "variables", which are used
> without declaration and create properties on the Global Object (which
> differ slightly from those created by properly declared global
> variables).
>
> Built-in objects, host objects, etc. are not variables. =A0Calling them
> as such serves only to create confusion (and there is enough of that
> as it is).
Global symbols: global vars, global objects, global mehtods, etc, all
of them properties of the Global Object (the one that 'window'
aliases)
--
Jorge.
|
|
0
|
|
|
|
Reply
|
Ry
|
8/8/2010 2:17:13 PM
|
|
Ry Nohryb :
> Global symbols: global vars, global objects, global mehtods, etc, all of
> them properties of the Global Object (the one that 'window' aliases)
baagoe@tournefort:~$ v8
V8 version 1.3.10
> window
(shell):1: ReferenceError: window is not defined
window
^
baagoe@tournefort:~$ js
Rhino 1.7 release 2 2010 01 20
js> window
js: "<stdin>", line 2: uncaught JavaScript runtime exception:
ReferenceError: "window" is not defined.
at <stdin>:2
--
Johannes
It is wonderful that nobody has ever yet fancied it to be sinful to
scratch where it itches, and that it has never been determined that the
only natural way of scratching is with such or such a finger and that
it is unnatural to scratch with any other. Jeremy Bentham.
|
|
0
|
|
|
|
Reply
|
Johannes
|
8/8/2010 2:51:37 PM
|
|
On Aug 8, 4:51=A0pm, Johannes Baagoe <baa...@baagoe.com> wrote:
>
> baagoe@tournefort:~$ v8
> V8 version 1.3.10> window
>
> (shell):1: ReferenceError: window is not defined
> window
> ^
>
> baagoe@tournefort:~$ js
> Rhino 1.7 release 2 2010 01 20
> js> window
> js: "<stdin>", line 2: uncaught JavaScript runtime exception:
> =A0 =A0 =A0 =A0 ReferenceError: "window" is not defined.
> =A0 =A0 =A0 =A0 at <stdin>:2
>
$ ~/JAVASCRIPT/v8/shell
V8 version 2.2.8
> 'window' in this
false
> var window=3D this
> 'window' in this
true
> this.window
[object global]
> window.k
> 'k' in window
false
> var k=3D 27
> window.k
27
>
$ /System/Library/Frameworks/JavaScriptCore.framework/Versions/A/
Resources/jsc
> this.window
undefined
> var window=3D this
undefined
> this.window
[object global]
> var k=3D 27
undefined
> window.k
27
>
It comes pre-defined in the browsers.
--
Jorge.
|
|
0
|
|
|
|
Reply
|
Ry
|
8/8/2010 3:46:44 PM
|
|
Ry Nohryb :
[`window`]
> It comes pre-defined in the browsers.
Sure.
My point (I expect you have guessed it) is that one cannot blindly
assume that there is a pre-defined global named "window". ECMAScript
isn't necessarily for browsers. It is a Turing-complete programming
language, and a rather interesting one, too.
I still wonder whether this newsgroup is about browser scripting or about
ECMAScript. It seems to me that most posts would be better placed somewhere
under comp.infosystems.www than under comp.language.javascript, which I
would assume to be about a computing language, not its use in browser
clients in client-server application based on the WWW model, complete with
DOM, compatibility issues, etc. All of which are certainly interesting,
but they have nothing to do with the programming language.
--
Johannes
It is wonderful that nobody has ever yet fancied it to be sinful to
scratch where it itches, and that it has never been determined that the
only natural way of scratching is with such or such a finger and that
it is unnatural to scratch with any other. Jeremy Bentham.
|
|
0
|
|
|
|
Reply
|
Johannes
|
8/8/2010 4:24:19 PM
|
|
On Aug 8, 6:24=A0pm, Johannes Baagoe <baa...@baagoe.com> wrote:
> Ry Nohryb :
>
> [`window`]
>
> > It comes pre-defined in the browsers.
>
> Sure.
>
> My point (I expect you have guessed it) is that one cannot blindly
> assume that there is a pre-defined global named "window". ECMAScript
> isn't necessarily for browsers. It is a Turing-complete programming
> language, and a rather interesting one, too.
>
> I still wonder whether this newsgroup is about browser scripting or about
> ECMAScript. It seems to me that most posts would be better placed somewhe=
re
> under comp.infosystems.www than under comp.language.javascript, which I
> would assume to be about a computing language, not its use in browser
> clients in client-server application based on the WWW model, complete wit=
h
> DOM, compatibility issues, etc. All of which are certainly interesting,
> but they have nothing to do with the programming language.
That's because it's the language of the web (browsers). For a long
time most people -even many programmers- didn't even realize that
Java !=3D=3D JavaScript, and you're expecting them to tell apart the DOM
from the core ? It's a fact that if it were not for the web (browsers)
JS would be completely unknown and irrelevant and dead. Or not?
--
Jorge.
|
|
0
|
|
|
|
Reply
|
Ry
|
8/8/2010 5:42:57 PM
|
|
On Sat, 7 Aug 2010 at 22:08:07, in comp.lang.javascript, David Mark
wrote:
<snip>
>Built-in objects, host objects, etc. are not variables.
The appearance of
"the globally defined variable NaN" and
"the globally defined variable Infinity"
in ECMA 262 v3 sec 8.5 suggests that some knowledgeable people disagree
with you.
>Calling them
>as such serves only to create confusion (and there is enough of that
>as it is).
As usual with dogmatic people you have failed to suggest a sensible term
for the general case, in this case covering everything that can be
assigned from and assigned to if not ReadOnly. That's the real recipe
for confusion.
John
--
John Harris
|
|
0
|
|
|
|
Reply
|
John
|
8/8/2010 5:49:18 PM
|
|
On Aug 8, 10:17=A0am, Ry Nohryb <jo...@jorgechamorro.com> wrote:
> On Aug 8, 7:08=A0am, David Mark <dmark.cins...@gmail.com> wrote:
>
> > (...) Named
> > arguments and function expressions (the latter of which should be
> > avoided) (...)
>
> NFEs ? Avoided ? Why ? NFEs are *not* the problem, the problem is
> Microsoft.
*Named* NFE's. And the problem is not MS, but your refusal to deal
with the reality of their bugs. Pretending they don't exist is not a
sound strategy.
>
> > The only gray area would be implied global "variables", which are used
> > without declaration and create properties on the Global Object (which
> > differ slightly from those created by properly declared global
> > variables).
>
> > Built-in objects, host objects, etc. are not variables. =A0Calling them
> > as such serves only to create confusion (and there is enough of that
> > as it is).
>
> Global symbols: global vars, global objects, global mehtods, etc, all
> of them properties of the Global Object
So what? That doesn't mean you should refer to all of them as
"variables".
> (the one that 'window'
> aliases)
We've been over that.
|
|
0
|
|
|
|
Reply
|
David
|
8/8/2010 7:40:46 PM
|
|
On Aug 8, 1:49=A0pm, John G Harris <j...@nospam.demon.co.uk> wrote:
> On Sat, 7 Aug 2010 at 22:08:07, in comp.lang.javascript, David Mark
> wrote:
>
> =A0 <snip>
>
> >Built-in objects, host objects, etc. are not variables.
>
> The appearance of
> =A0 "the globally defined variable NaN" and
> =A0 "the globally defined variable Infinity"
> in ECMA 262 v3 sec 8.5 suggests that some knowledgeable people disagree
> with you.
You seem to have missed the point that it is not a matter of knowledge
but communication. The specs are written for *implementors*, not
programmers. That's why JS programmers don't refer to the language as
"ECMAScript" and rarely talk of syntax in terms of "productions". ;)
>
> >Calling them
> >as such serves only to create confusion (and there is enough of that
> >as it is).
>
> As usual with dogmatic people you have failed to suggest a sensible term
> for the general case, in this case covering everything that can be
> assigned from and assigned to if not ReadOnly. That's the real recipe
> for confusion.
>
There is no need for a term for such a general case (except perhaps
for implementors). Trying to use such a term in programming
discussions will only serve to confuse.
|
|
0
|
|
|
|
Reply
|
David
|
8/8/2010 7:45:43 PM
|
|
On Aug 8, 9:40=A0pm, David Mark <dmark.cins...@gmail.com> wrote:
> On Aug 8, 10:17=A0am, Ry Nohryb <jo...@jorgechamorro.com> wrote:
>
> > NFEs ? Avoided ? Why ? NFEs are *not* the problem, the problem is
> > Microsoft.
>
> *Named* NFE's. (...)
Yes, the truly, really well named ones: named-named-function-
expressions :-)
> And the problem is not MS, but your refusal to deal
> with the reality of their bugs. (...)
You should avoid the IEs, not the NFEs... and I have a plan for this:
do you want to know more ?
--
Jorge.
|
|
0
|
|
|
|
Reply
|
Ry
|
8/8/2010 8:55:03 PM
|
|
On 2010-08-08 12:45 PM, David Mark wrote:
> On Aug 8, 1:49 pm, John G Harris<j...@nospam.demon.co.uk> wrote:
>> On Sat, 7 Aug 2010 at 22:08:07, in comp.lang.javascript, David Mark
>> wrote:
>>
>> <snip>
>>
>>> Built-in objects, host objects, etc. are not variables.
>>
>> The appearance of
>> "the globally defined variable NaN" and
>> "the globally defined variable Infinity"
>> in ECMA 262 v3 sec 8.5 suggests that some knowledgeable people disagree
>> with you.
>
> You seem to have missed the point that it is not a matter of knowledge
> but communication. The specs are written for *implementors*, not
> programmers. That's why JS programmers don't refer to the language as
> "ECMAScript" and rarely talk of syntax in terms of "productions". ;)
>
>
Of all possible arguments could have been made, that one is truly lousy.
Specification terminology is absolutely appropriate for posts on
comp.lang.javascript.
--
Garrett
|
|
0
|
|
|
|
Reply
|
Garrett
|
8/8/2010 10:01:43 PM
|
|
On Aug 8, 6:01=A0pm, Garrett Smith <dhtmlkitc...@gmail.com> wrote:
> On 2010-08-08 12:45 PM, David Mark wrote:
>
>
>
> > On Aug 8, 1:49 pm, John G Harris<j...@nospam.demon.co.uk> =A0wrote:
> >> On Sat, 7 Aug 2010 at 22:08:07, in comp.lang.javascript, David Mark
> >> wrote:
>
> >> =A0 =A0<snip>
>
> >>> Built-in objects, host objects, etc. are not variables.
>
> >> The appearance of
> >> =A0 =A0"the globally defined variable NaN" and
> >> =A0 =A0"the globally defined variable Infinity"
> >> in ECMA 262 v3 sec 8.5 suggests that some knowledgeable people disagre=
e
> >> with you.
>
> > You seem to have missed the point that it is not a matter of knowledge
> > but communication. =A0The specs are written for *implementors*, not
> > programmers. =A0That's why JS programmers don't refer to the language a=
s
> > "ECMAScript" and rarely talk of syntax in terms of "productions". =A0;)
>
> Of all possible arguments could have been made, that one is truly lousy.
No, you simply can't grasp the difference, which is why you are a
truly lousy communicator.
>
> Specification terminology is absolutely appropriate for posts on
> comp.lang.javascript.
That's a ridiculous generalization.
|
|
0
|
|
|
|
Reply
|
David
|
8/8/2010 10:05:18 PM
|
|
On 2010-08-08 03:05 PM, David Mark wrote:
> On Aug 8, 6:01 pm, Garrett Smith<dhtmlkitc...@gmail.com> wrote:
>> On 2010-08-08 12:45 PM, David Mark wrote:
>>
>>
>>
>>> On Aug 8, 1:49 pm, John G Harris<j...@nospam.demon.co.uk> wrote:
>>>> On Sat, 7 Aug 2010 at 22:08:07, in comp.lang.javascript, David Mark
>>>> wrote:
>>
>>>> <snip>
>>
>>>>> Built-in objects, host objects, etc. are not variables.
>>
>>>> The appearance of
>>>> "the globally defined variable NaN" and
>>>> "the globally defined variable Infinity"
>>>> in ECMA 262 v3 sec 8.5 suggests that some knowledgeable people disagree
>>>> with you.
>>
>>> You seem to have missed the point that it is not a matter of knowledge
>>> but communication. The specs are written for *implementors*, not
>>> programmers. That's why JS programmers don't refer to the language as
>>> "ECMAScript" and rarely talk of syntax in terms of "productions". ;)
>>
>> Of all possible arguments could have been made, that one is truly lousy.
>
> No, you simply can't grasp the difference, which is why you are a
> truly lousy communicator.
>
What I wrote was unambiguous and clear. Apparently I communicated
effectively because you understood exactly what I meant.
>>
>> Specification terminology is absolutely appropriate for posts on
>> comp.lang.javascript.
>
> That's a ridiculous generalization.
It is neither; it is a universal truth.
And it is the reason that your initial argument was lousy one.
Anyone who has read the group for several years, has seen the use of
specification terminology to describe the language in posts from
Cornford, Lasse, Lahn, John G Harris. Though none from you.
You can't really invalidate specification terminology by claiming that
the specification was not intended for programmers; all that does is
justify your apparent unwillingness to RTFM.
--
Garrett
|
|
0
|
|
|
|
Reply
|
Garrett
|
8/9/2010 12:01:26 AM
|
|
On Aug 8, 8:01=A0pm, Garrett Smith <dhtmlkitc...@gmail.com> wrote:
> On 2010-08-08 03:05 PM, David Mark wrote:
>
>
>
>
>
> > On Aug 8, 6:01 pm, Garrett Smith<dhtmlkitc...@gmail.com> =A0wrote:
> >> On 2010-08-08 12:45 PM, David Mark wrote:
>
> >>> On Aug 8, 1:49 pm, John G Harris<j...@nospam.demon.co.uk> =A0 =A0wrot=
e:
> >>>> On Sat, 7 Aug 2010 at 22:08:07, in comp.lang.javascript, David Mark
> >>>> wrote:
>
> >>>> =A0 =A0 <snip>
>
> >>>>> Built-in objects, host objects, etc. are not variables.
>
> >>>> The appearance of
> >>>> =A0 =A0 "the globally defined variable NaN" and
> >>>> =A0 =A0 "the globally defined variable Infinity"
> >>>> in ECMA 262 v3 sec 8.5 suggests that some knowledgeable people disag=
ree
> >>>> with you.
>
> >>> You seem to have missed the point that it is not a matter of knowledg=
e
> >>> but communication. =A0The specs are written for *implementors*, not
> >>> programmers. =A0That's why JS programmers don't refer to the language=
as
> >>> "ECMAScript" and rarely talk of syntax in terms of "productions". =A0=
;)
>
> >> Of all possible arguments could have been made, that one is truly lous=
y.
>
> > No, you simply can't grasp the difference, which is why you are a
> > truly lousy communicator.
>
> What I wrote was unambiguous and clear.
In your mind. To anyone else reading this, it is likely clear that
you have poked your head into a technical discussion to add nothing
but your own personal and juvenile nonsense.
> Apparently I communicated
> effectively because you understood exactly what I meant.
You try too hard.
>
>
>
> >> Specification terminology is absolutely appropriate for posts on
> >> comp.lang.javascript.
>
> > That's a ridiculous generalization.
>
> It is neither; it is a universal truth.
It certainly is not.
>
> And it is the reason that your initial argument was lousy one.
Nope.
>
> Anyone who has read the group for several years, has seen the use of
> specification terminology to describe the language in posts from
> Cornford, Lasse, Lahn, John G Harris.
Of course, you missed the point again. Each discussion in this group
has a context. There are times when such language is appropriate and
times when it is not.
> Though none from you.
That's not true. Just another gross generalization on your part (and
a lame attempt to puff up your own ego).
>
> You can't really invalidate specification terminology by claiming that
> the specification was not intended for programmers; all that does is
> justify your apparent unwillingness to RTFM.
No such unwillingness is apparent; not even to you. You are simply a
basket case who has tried and failed to make a career out of
memorizing specifications. As we've seen over and over, such
memorization (and incessant regurgitation, often in inappropriate
contexts) does not buy you a thing.
|
|
0
|
|
|
|
Reply
|
David
|
8/9/2010 4:30:45 AM
|
|
On Aug 8, 4:55=A0pm, Ry Nohryb <jo...@jorgechamorro.com> wrote:
> On Aug 8, 9:40=A0pm, David Mark <dmark.cins...@gmail.com> wrote:
>
> > On Aug 8, 10:17=A0am, Ry Nohryb <jo...@jorgechamorro.com> wrote:
>
> > > NFEs ? Avoided ? Why ? NFEs are *not* the problem, the problem is
> > > Microsoft.
>
> > *Named* NFE's. (...)
>
> Yes, the truly, really wellnamedones:named-named-function-
> expressions :-)
Nice catch, jackass. Commenting on obvious typos is about what I'd
expect from you.
>
> > And the problem is not MS, but your refusal to deal
> > with the reality of their bugs. (...)
>
> You should avoid the IEs, not the NFEs... and I have a plan for this:
> do you want to know more ?
Your plan has been heard and shot down. Get better Jorge.
|
|
0
|
|
|
|
Reply
|
David
|
8/9/2010 4:34:56 AM
|
|
On Aug 8, 8:01=A0pm, Garrett Smith
[...]
>
> Anyone who has read the group for several years, has seen the use of
> specification terminology to describe the language in posts from
> Cornford, Lasse, Lahn, John G Harris. Though none from you.
>
I cite the specification when the context calls for it. For example,
three years ago you asked me to explain to you why 0 is not less than
null (presumably to avoid RTFM yourself).
http://groups.google.com/group/comp.lang.javascript/msg/55dd0547c67e99a1
Bets that I won't bother to dig up an old post to deflect your dubious
claims usually "pay". Not your lucky day it seems. :)
|
|
0
|
|
|
|
Reply
|
David
|
8/9/2010 4:54:53 AM
|
|
On 2010-08-08 09:30 PM, David Mark wrote:
> On Aug 8, 8:01 pm, Garrett Smith<dhtmlkitc...@gmail.com> wrote:
>> On 2010-08-08 03:05 PM, David Mark wrote:
>>
>>
>>
>>
>>
>>> On Aug 8, 6:01 pm, Garrett Smith<dhtmlkitc...@gmail.com> wrote:
>>>> On 2010-08-08 12:45 PM, David Mark wrote:
>>
>>>>> On Aug 8, 1:49 pm, John G Harris<j...@nospam.demon.co.uk> wrote:
>>>>>> On Sat, 7 Aug 2010 at 22:08:07, in comp.lang.javascript, David Mark
>>>>>> wrote:
>>
>>>>>> <snip>
>>
>>>>>>> Built-in objects, host objects, etc. are not variables.
>>
>>>>>> The appearance of
>>>>>> "the globally defined variable NaN" and
>>>>>> "the globally defined variable Infinity"
>>>>>> in ECMA 262 v3 sec 8.5 suggests that some knowledgeable people disagree
>>>>>> with you.
>>
>>>>> You seem to have missed the point that it is not a matter of knowledge
>>>>> but communication. The specs are written for *implementors*, not
>>>>> programmers. That's why JS programmers don't refer to the language as
>>>>> "ECMAScript" and rarely talk of syntax in terms of "productions". ;)
>>
>>>> Of all possible arguments could have been made, that one is truly lousy.
>>
>>> No, you simply can't grasp the difference, which is why you are a
>>> truly lousy communicator.
>>
>> What I wrote was unambiguous and clear.
>
> In your mind. To anyone else reading this, it is likely clear that
> you have poked your head into a technical discussion to add nothing
> but your own personal and juvenile nonsense.
>
>> Apparently I communicated
>> effectively because you understood exactly what I meant.
>
> You try too hard.
>
I can't see why that's worth arguing. I wrote something clear and you
got what I meant.
>>
>>
>>
>>>> Specification terminology is absolutely appropriate for posts on
>>>> comp.lang.javascript.
>>
>>> That's a ridiculous generalization.
>>
>> It is neither; it is a universal truth.
>
> It certainly is not.
>
No. Specification terminology is absolutely appropriate for on-topic
posts on javascript.
If you don't like that, or post things that are continually off-topic
material for whatever reason (stubbornness, arrogance, insanity, and it
doesn't really matter what your personal problems are) then don't post
any more.
Your post is off-topic.
Off-topic material, such as interspersed unrelated emotional remarks,
within a technical discussion are plaguing this group. The spam at least
appears in a separate thread, so it can be easily ignored. Your trash
appears all over the place.
--
Garrett
|
|
0
|
|
|
|
Reply
|
Garrett
|
8/9/2010 5:13:20 AM
|
|
On Aug 9, 1:13=A0am, Garrett Smith <dhtmlkitc...@gmail.com> wrote:
> On 2010-08-08 09:30 PM, David Mark wrote:
>
>
>
>
>
> > On Aug 8, 8:01 pm, Garrett Smith<dhtmlkitc...@gmail.com> =A0wrote:
> >> On 2010-08-08 03:05 PM, David Mark wrote:
>
> >>> On Aug 8, 6:01 pm, Garrett Smith<dhtmlkitc...@gmail.com> =A0 =A0wrote=
:
> >>>> On 2010-08-08 12:45 PM, David Mark wrote:
>
> >>>>> On Aug 8, 1:49 pm, John G Harris<j...@nospam.demon.co.uk> =A0 =A0 =
=A0wrote:
> >>>>>> On Sat, 7 Aug 2010 at 22:08:07, in comp.lang.javascript, David Mar=
k
> >>>>>> wrote:
>
> >>>>>> =A0 =A0 =A0<snip>
>
> >>>>>>> Built-in objects, host objects, etc. are not variables.
>
> >>>>>> The appearance of
> >>>>>> =A0 =A0 =A0"the globally defined variable NaN" and
> >>>>>> =A0 =A0 =A0"the globally defined variable Infinity"
> >>>>>> in ECMA 262 v3 sec 8.5 suggests that some knowledgeable people dis=
agree
> >>>>>> with you.
>
> >>>>> You seem to have missed the point that it is not a matter of knowle=
dge
> >>>>> but communication. =A0The specs are written for *implementors*, not
> >>>>> programmers. =A0That's why JS programmers don't refer to the langua=
ge as
> >>>>> "ECMAScript" and rarely talk of syntax in terms of "productions". =
=A0;)
>
> >>>> Of all possible arguments could have been made, that one is truly lo=
usy.
>
> >>> No, you simply can't grasp the difference, which is why you are a
> >>> truly lousy communicator.
>
> >> What I wrote was unambiguous and clear.
>
> > In your mind. =A0To anyone else reading this, it is likely clear that
> > you have poked your head into a technical discussion to add nothing
> > but your own personal and juvenile nonsense.
>
> >> Apparently I communicated
> >> effectively because you understood exactly what I meant.
>
> > You try too hard.
>
> I can't see why that's worth arguing. I wrote something clear and you
> got what I meant.
You can't see much of anything it seems.
>
>
>
> >>>> Specification terminology is absolutely appropriate for posts on
> >>>> comp.lang.javascript.
>
> >>> That's a ridiculous generalization.
>
> >> It is neither; it is a universal truth.
>
> > It certainly is not.
>
> No. Specification terminology is absolutely appropriate for on-topic
> posts on javascript.
Again with the generalization.
>
> If you don't like that, or post things that are continually off-topic
> material for whatever reason (stubbornness, arrogance, insanity, and it
> doesn't really matter what your personal problems are)
LOL. Pot calling the kettle black again.
> then don't post
> any more.
>
> Your post is off-topic.
Shut up, twit. Now that's off-topic, but still much needed at this
point.
>
> Off-topic material, such as interspersed unrelated emotional remarks,
> within a technical discussion are plaguing this group.
So stop popping in to technical discussions with personal attacks (and
then whining when you get smacked on the nose).
> The spam at least
> appears in a separate thread, so it can be easily ignored. Your trash
> appears all over the place.
I assume you've read the next post and are now crying in a corner
somewhere. :)
|
|
0
|
|
|
|
Reply
|
David
|
8/9/2010 5:21:43 AM
|
|
On 2010-08-08 09:54 PM, David Mark wrote:
> On Aug 8, 8:01 pm, Garrett Smith
>
[...]
>
> I cite the specification when the context calls for it. For example,
> three years ago you asked me to explain to you why 0 is not less than
> null (presumably to avoid RTFM yourself).
>
> http://groups.google.com/group/comp.lang.javascript/msg/55dd0547c67e99a1
>
That's a good example of an on-topic post, so you're capable of posting
on-topic.
There's a big difference between that and obnoxious noise, massive
overquoting, and lazy and sloppy formatting that makes up the majority
of your postings.
--
Garrett
|
|
0
|
|
|
|
Reply
|
Garrett
|
8/9/2010 5:34:36 AM
|
|
On 2010-08-08 09:34 PM, David Mark wrote:
> On Aug 8, 4:55 pm, Ry Nohryb<jo...@jorgechamorro.com> wrote:
>> On Aug 8, 9:40 pm, David Mark<dmark.cins...@gmail.com> wrote:
>>
>>> On Aug 8, 10:17 am, Ry Nohryb<jo...@jorgechamorro.com> wrote:
>>
>>>> NFEs ? Avoided ? Why ? NFEs are *not* the problem, the problem is
>>>> Microsoft.
>>
>>> *Named* NFE's. (...)
>>
>> Yes, the truly, really wellnamedones:named-named-function-
>> expressions :-)
>
> Nice catch, jackass.
Try repeating that looking in the mirror.
Commenting on obvious typos is about what I'd
> expect from you.
>
Is there a contradiction here?
Either you're concerned about using correct terminology or you're not.
Frankly I don't care about what you call it; you've shown repeated
unwillingness to hold civil technical discussion, trying to discuss
anything with you is pretty much a waste of time anyway, so call it
whatever you want and I'll happily ignore you.
if you tried to correct Jorge and then posted wrong information again
(that's about the fourth post in a row from you I've read today that
follows that pattern).
--
Garrett
|
|
0
|
|
|
|
Reply
|
Garrett
|
8/9/2010 5:49:09 AM
|
|
On 2010-08-08 10:21 PM, David Mark wrote:
> On Aug 9, 1:13 am, Garrett Smith<dhtmlkitc...@gmail.com> wrote:
>> On 2010-08-08 09:30 PM, David Mark wrote:
>>
>>
>>
>>
>>
>>> On Aug 8, 8:01 pm, Garrett Smith<dhtmlkitc...@gmail.com> wrote:
>>>> On 2010-08-08 03:05 PM, David Mark wrote:
>>
>>>>> On Aug 8, 6:01 pm, Garrett Smith<dhtmlkitc...@gmail.com> wrote:
>>>>>> On 2010-08-08 12:45 PM, David Mark wrote:
>>
>>>>>>> On Aug 8, 1:49 pm, John G Harris<j...@nospam.demon.co.uk> wrote:
>>>>>>>> On Sat, 7 Aug 2010 at 22:08:07, in comp.lang.javascript, David Mark
>>>>>>>> wrote:
>>
>>>>>>>> <snip>
[...]
>
> So stop popping in to technical discussions with personal attacks (and
> then whining when you get smacked on the nose).
>
>> The spam at least
>> appears in a separate thread, so it can be easily ignored. Your trash
>> appears all over the place.
>
> I assume you've read the next post and are now crying in a corner
> somewhere. :)
It sounds like you want to get a little more personal.
Sissy flame wars are off-topic. If you wanted to meet in person -- and
that goes for anyone -- you could have just emailed me rather than post
a sissy drama queen act with keystrokes. You have my email address.
I'm not getting hit in the nose and although your trash hurts my ideals
for this NG, I'm surely not crying.
--
Garrett
|
|
0
|
|
|
|
Reply
|
Garrett
|
8/9/2010 6:09:00 AM
|
|
On Jul 30, 2:39=A0am, Jesse <imje...@gmail.com> wrote:
>
> myNamespace =3D =A0{}; //namespace for holding any objects/functions
>
> //helpModule as an example
> myNamespace.HelpModule =3D new (function(){
> =A0 =A0 this.abc =3D '123';
> =A0 =A0 //lots of other code in here...
> =A0 =A0 return this;
>
> })();
What we have here is the application of the 'new' operator to an
anonymous constructor function.
Seems entirely legitimate to me and not at all obscure.
However, I would drop the 'return' statement inside the body.
--
Hubert
|
|
0
|
|
|
|
Reply
|
Hubert
|
8/9/2010 8:13:32 AM
|
|
On Aug 9, 10:13=A0am, Hubert Kauker <hubert.kau...@travelbasys.de>
wrote:
> On Jul 30, 2:39=A0am, Jesse <imje...@gmail.com> wrote:
>
> > myNamespace =3D =A0{}; //namespace for holding any objects/functions
>
> > //helpModule as an example
> > myNamespace.HelpModule =3D new (function(){
> > =A0 =A0 this.abc =3D '123';
> > =A0 =A0 //lots of other code in here...
> > =A0 =A0 return this;
>
> > })();
>
> What we have here is the application of the 'new' operator to an
> anonymous constructor function.
> Seems entirely legitimate to me and not at all obscure.
It's not too obscure, but IMO this is better (clearer):
myNamespace.HelpModule=3D {};
myNamespace.HelpModule.abc=3D "123";
myNamespace.HelpModule.aMethod=3D function(){ ... };
....etc
> However, I would drop the 'return' statement inside the body.
Yep, it's not needed.
The (function () {})() pattern is being used too often gratuitously,
for no reason, such as in this FAQ entry:
http://groups.google.com/group/comp.lang.javascript/browse_thread/thread/b9=
aede5baeb64755#
var numberToFixed =3D
(function() {
return toFixedString;
(...)
--
Jorge.
|
|
0
|
|
|
|
Reply
|
Ry
|
8/9/2010 8:47:31 AM
|
|
On Aug 9, 10:13=A0am, Hubert Kauker <hubert.kau...@travelbasys.de>
wrote:
> On Jul 30, 2:39=A0am, Jesse <imje...@gmail.com> wrote:
>
>
>
> > myNamespace =3D =A0{}; //namespace for holding any objects/functions
>
> > //helpModule as an example
> > myNamespace.HelpModule =3D new (function(){
> > =A0 =A0 this.abc =3D '123';
> > =A0 =A0 //lots of other code in here...
> > =A0 =A0 return this;
>
> > })();
>
> What we have here is the application of the 'new' operator to an
> anonymous constructor function.
> Seems entirely legitimate to me and not at all obscure.
Ah, and that extra () at the end aren't wanted: it should be new
function(){}; or new (function(){}); but not new (function(){})();
--
Jorge.
|
|
0
|
|
|
|
Reply
|
Ry
|
8/9/2010 8:54:52 AM
|
|
Garrett Smith wrote on 09 aug 2010 in comp.lang.javascript:
> Of all possible arguments could have been made, that one is truly lousy.
>
> Specification terminology is absolutely appropriate for posts on
> comp.lang.javascript.
Arguments in this NG's terminology are the parameters of a function.
;-)
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
|
|
0
|
|
|
|
Reply
|
Evertjan
|
8/9/2010 11:17:53 AM
|
|
On 7/29/2010 11:59 PM, David Mark wrote:
> On Jul 29, 11:38 pm, RobG <rg...@iinet.net.au> wrote:
>> On Jul 30, 10:39 am, Jesse <imje...@gmail.com> wrote:
>>
....
>> A function's this keyword has nothing to do with scope, it is a
>> reference to an object. It is set by the call to the function, you
>> can't control it by how you create the function other than by limiting
>> how it is called.
>
> Thanks for picking that up. Somehow I missed that offending use of
> the term. It seems to be so pervasive that virtually every developer
> who uses the "major" libraries thinks that scope is the - this -
> object; which leaves the question of what they would call the concept
> of scope (if they are even aware of the concept).
>
Well, what is the correct way to think about scope in Javascript? I tend
to think of it as
global
|_ function
|_ inner function
|_ inner, inner function
|_ etc...
but that's probably naive.
--
--williamc
|
|
0
|
|
|
|
Reply
|
williamc
|
8/9/2010 12:11:33 PM
|
|
On Aug 9, 2:11=A0pm, williamc <te...@williamc.com> wrote:
>
> Well, what is the correct way to think about scope in Javascript? I tend
> to think of it as
>
> global
> |_ function
> =A0 =A0|_ inner function
> =A0 =A0 =A0 |_ inner, inner function
> =A0 =A0 =A0 =A0 =A0|_ etc...
>
> but that's probably naive.
It's perfect, that's the way it is, but only if the graph is showing
function declarations and not function calls (only if it's not a call
chain):
NOT:
function f () { var k=3D 27; return inner() }
function inner () { return innerinner() }
function innerinner () { return k }
f()
--> ReferenceError: Can't find variable: k
Call chain: f()-->inner()-->innerinner()
YES:
function f () {
var k=3D 27;
return inner();
function inner () {
return innerinner();
function innerinner () { return k }
}
}
f()
--> 27
Call chain: f()-->inner()-->innerinner()
--
Jorge.
|
|
0
|
|
|
|
Reply
|
Ry
|
8/9/2010 1:34:54 PM
|
|
On 8/9/2010 9:34 AM, Ry Nohryb wrote:
> On Aug 9, 2:11 pm, williamc <te...@williamc.com> wrote:
>>
>> Well, what is the correct way to think about scope in Javascript? I tend
>> to think of it as
>>
>> global
>> |_ function
>> |_ inner function
>> |_ inner, inner function
>> |_ etc...
>>
>> but that's probably naive.
>
> It's perfect, that's the way it is, but only if the graph is showing
> function declarations and not function calls (only if it's not a call
> chain):
>
> NOT:
> function f () { var k= 27; return inner() }
> function inner () { return innerinner() }
> function innerinner () { return k }
>
> f()
> --> ReferenceError: Can't find variable: k
> Call chain: f()-->inner()-->innerinner()
>
> YES:
> function f () {
> var k= 27;
> return inner();
> function inner () {
> return innerinner();
> function innerinner () { return k }
> }
> }
>
> f()
> --> 27
> Call chain: f()-->inner()-->innerinner()
> --
> Jorge.
thx, yeah that makes sense. I wonder if the following code from Mozilla
Dev Center kind of illustrates the tendency to conflate scope with the
this object?
I know 'scope' in this function is only a local variable *name*, but it
struck me as kind of a misleading in the 'way to think about it'
department...
if (!Array.prototype.forEach) {
Array.prototype.forEach = function(fn, scope) {
scope = scope || this;
for(var i = 0; i < this.length; i++) {
fn.call(scope, this[i], i, this);
}
};
}
--
--williamc
|
|
0
|
|
|
|
Reply
|
williamc
|
8/9/2010 2:03:54 PM
|
|
On 8/9/2010 10:03 AM, williamc wrote:
> On 8/9/2010 9:34 AM, Ry Nohryb wrote:
>> On Aug 9, 2:11 pm, williamc <te...@williamc.com> wrote:
>>>
>>> Well, what is the correct way to think about scope in Javascript? I tend
>>> to think of it as
>>>
>>> global
>>> |_ function
>>> |_ inner function
>>> |_ inner, inner function
>>> |_ etc...
>>>
>>> but that's probably naive.
>>
>> It's perfect, that's the way it is, but only if the graph is showing
>> function declarations and not function calls (only if it's not a call
>> chain):
>>
>> NOT:
>> function f () { var k= 27; return inner() }
>> function inner () { return innerinner() }
>> function innerinner () { return k }
>>
>> f()
>> --> ReferenceError: Can't find variable: k
>> Call chain: f()-->inner()-->innerinner()
>>
>> YES:
>> function f () {
>> var k= 27;
>> return inner();
>> function inner () {
>> return innerinner();
>> function innerinner () { return k }
>> }
>> }
>>
>> f()
>> --> 27
>> Call chain: f()-->inner()-->innerinner()
>> --
>> Jorge.
>
> thx, yeah that makes sense. I wonder if the following code from Mozilla
> Dev Center kind of illustrates the tendency to conflate scope with the
> this object?
>
> I know 'scope' in this function is only a local variable *name*, but it
> struck me as kind of a misleading in the 'way to think about it'
> department...
>
> if (!Array.prototype.forEach) {
> Array.prototype.forEach = function(fn, scope) {
> scope = scope || this;
> for(var i = 0; i < this.length; i++) {
> fn.call(scope, this[i], i, this);
> }
> };
> }
>
Oops, had my head up my butt on that one. I meant to say 'argument
name', not 'local variable name', and that function is *not* from
Mozilla, I believe it's from one of the Sitepoint books.
--
--williamc
|
|
0
|
|
|
|
Reply
|
williamc
|
8/9/2010 2:13:21 PM
|
|
On Aug 9, 4:13=A0pm, williamc <te...@williamc.com> wrote:
> On 8/9/2010 10:03 AM, williamc wrote:
>
>
>
>
>
>
>
>
>
> > On 8/9/2010 9:34 AM, Ry Nohryb wrote:
> >> On Aug 9, 2:11 pm, williamc <te...@williamc.com> wrote:
>
> >>> Well, what is the correct way to think about scope in Javascript? I t=
end
> >>> to think of it as
>
> >>> global
> >>> |_ function
> >>> =A0 =A0|_ inner function
> >>> =A0 =A0 =A0 |_ inner, inner function
> >>> =A0 =A0 =A0 =A0 =A0|_ etc...
>
> >>> but that's probably naive.
>
> >> It's perfect, that's the way it is, but only if the graph is showing
> >> function declarations and not function calls (only if it's not a call
> >> chain):
>
> >> NOT:
> >> function f () { var k=3D 27; return inner() }
> >> function inner () { return innerinner() }
> >> function innerinner () { return k }
>
> >> f()
> >> --> ReferenceError: Can't find variable: k
> >> Call chain: f()-->inner()-->innerinner()
>
> >> YES:
> >> function f () {
> >> =A0var k=3D 27;
> >> =A0return inner();
> >> =A0function inner () {
> >> =A0 return innerinner();
> >> =A0 function innerinner () { return k }
> >> =A0}
> >> }
>
> >> f()
> >> --> 27
> >> Call chain: f()-->inner()-->innerinner()
> >> --
> >> Jorge.
>
> > thx, yeah that makes sense. I wonder if the following code from Mozilla
> > Dev Center kind of illustrates the tendency to conflate scope with the
> > this object?
>
> > I know 'scope' in this function is only a local variable *name*, but it
> > struck me as kind of a misleading in the 'way to think about it'
> > department...
>
> > if (!Array.prototype.forEach) {
> > =A0 =A0 Array.prototype.forEach =3D function(fn, scope) {
> > =A0 =A0 =A0 =A0 scope =3D scope || this;
> > =A0 =A0 =A0 =A0 for(var i =3D 0; i < this.length; i++) {
> > =A0 =A0 =A0 =A0 =A0 =A0 fn.call(scope, this[i], i, this);
> > =A0 =A0 =A0 =A0 }
> > =A0 =A0 };
> > }
>
> Oops, had my head up my butt on that one. I meant to say 'argument
> name', not 'local variable name', and that function is *not* from
> Mozilla, I believe it's from one of the Sitepoint books.
Yep, it's very often that I see too 'this' called "the scope",
nowadays. Maybe it's so called in some other language... (?)
--
Jorge.
|
|
0
|
|
|
|
Reply
|
Ry
|
8/9/2010 2:52:45 PM
|
|
On Sun, 8 Aug 2010 at 12:45:43, in comp.lang.javascript, David Mark
wrote:
<snip>
>You seem to have missed the point that it is not a matter of knowledge
>but communication. The specs are written for *implementors*, not
>programmers. That's why JS programmers don't refer to the language as
>"ECMAScript" and rarely talk of syntax in terms of "productions". ;)
So you feel that it's wrong to say anything in this news group that
would not be understood by the people who write JQuery ?
An amazing number of programmers don't know what a statement is,
including some with PhDs. That's no reason for not using the word as
defined in the language specification.
<snip>
>There is no need for a term for such a general case (except perhaps
>for implementors). Trying to use such a term in programming
>discussions will only serve to confuse.
C++ manages to find a use for such a general case, but then it's a
language for real programmers.
Your definition can be thoroughly confusing at times :
1. Back in the days of ECMA 262 v2 you could have a program where
undefined was a variable in one browser and not a variable in another
(because it was pre-defined). This is confusing.
2. Even now in v3 you can write to undefined, so it now suddenly becomes
a variable (because it has now been implicitly declared). This is
confusing.
3. When someone uses My Library they access a thing called API. It's not
a variable according to you (because they didn't declare it). This is
also confusing.
John
--
John Harris
|
|
0
|
|
|
|
Reply
|
John
|
8/9/2010 2:55:43 PM
|
|
On Aug 9, 3:03 pm, williamc wrote:
> On 8/9/2010 9:34 AM, Ry Nohryb wrote:
<snip>
>> It's perfect, that's the way it is, but only if the graph
>> is showing function declarations and not function calls
>> (only if it's not a call chain):
<snip>
> thx, yeah that makes sense. I wonder if the following code
> from Mozilla Dev Center kind of illustrates the tendency
> to conflate scope with the this object?
>
> I know 'scope' in this function is only a local variable
As we a re quibbling about terminology today; in ECMA 262 terminology,
in a function definition (the code that makes up a function
declaration or a function expression) the parenthesised list of
Identifiers that precedes the function body's surrounding braces is
called a FormalParameterList, which makes 'formal parameter', or
something like 'function parameter', or just 'parameter' appropriate
labels for any single item in that list (with 'argument' being applied
to the value passed into a call to a function, and so (possibly)
eventually assigned to a property of the Variable object with a name
that corresponds with the formal parameter's name ).
> *name*, but it struck me as kind of a misleading in the
> 'way to think about it' department...
>
> if (!Array.prototype.forEach) {
> Array.prototype.forEach = function(fn, scope) {
> scope = scope || this;
> for(var i = 0; i < this.length; i++) {
> fn.call(scope, this[i], i, this);
> }
> };
>
> }
Yes, in a language where the scope is (potentially) complex and should
be understood it is misleading to attach the label "scope" to
something that has noting to do with scoping. Frequently people
(particularly coming from other programming languages with
expectations about how things 'should work') find it difficult to come
to terms with the way that javascript determines the value of the -
this - keyword at runtime and in response to how a function is called.
They (often) expect the - this -value to be determined by the context
of its use in the source code, but because scope (the resolution of
Identifiers) is determined by the structure of the source code any
conflation of scope and the - this - value plays into that unfounded
expectation and promotes a misconception.
Richard.
|
|
0
|
|
|
|
Reply
|
Richard
|
8/9/2010 3:14:43 PM
|
|
In comp.lang.javascript message <i3o41e$pi3$1@news.eternal-
september.org>, Sun, 8 Aug 2010 22:34:36, Garrett Smith
<dhtmlkitchen@gmail.com> posted:
>There's a big difference between that and obnoxious noise, massive
>overquoting, and lazy and sloppy formatting that makes up the majority
>of your postings.
Those who write carelessly and in haste, without checking what they have
written, are unlikely to be good programmers; this newsgroup is haunted
by three prime examples. David Mark posts more articles than Thomas
Lahn and Garrett Smith put together.
--
(c) John Stockton, nr London UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (RFCs 5536/7)
Do not Mail News to me. Before a reply, quote with ">" or "> " (RFCs 5536/7)
|
|
0
|
|
|
|
Reply
|
Dr
|
8/10/2010 4:05:17 PM
|
|
On Aug 9, 10:55=A0am, John G Harris <j...@nospam.demon.co.uk> wrote:
> On Sun, 8 Aug 2010 at 12:45:43, in comp.lang.javascript, David Mark
> wrote:
>
> =A0 <snip>
>
> >You seem to have missed the point that it is not a matter of knowledge
> >but communication. =A0The specs are written for *implementors*, not
> >programmers. =A0That's why JS programmers don't refer to the language as
> >"ECMAScript" and rarely talk of syntax in terms of "productions". =A0;)
>
> So you feel that it's wrong to say anything in this news group that
> would not be understood by the people who write JQuery ?
No, as mentioned, discussions have context, so generalizations about
"anything in this news group" miss the point.
>
> An amazing number of programmers don't know what a statement is,
> including some with PhDs. That's no reason for not using the word as
> defined in the language specification.
I didn't say anything about that word.
>
> =A0 <snip>
>
> >There is no need for a term for such a general case (except perhaps
> >for implementors). =A0Trying to use such a term in programming
> >discussions will only serve to confuse.
>
> C++ manages to find a use for such a general case, but then it's a
> language for real programmers.
I don't care what C++ does.
>
> Your definition can be thoroughly confusing at times :
>
> 1. Back in the days of ECMA 262 v2 you could have a program where
> undefined was a variable in one browser and not a variable in another
> (because it was pre-defined). This is confusing.
And irrelevant today. Not to mention that calling every global a
"variable" does nothing to make it less confusing.
>
> 2. Even now in v3 you can write to undefined, so it now suddenly becomes
> a variable (because it has now been implicitly declared). This is
> confusing.
That's just a case of doing something silly.
>
> 3. When someone uses My Library they access a thing called API.
A global variable.
> It's not
> a variable according to you (because they didn't declare it). This is
> also confusing.
You misunderstood. I didn't mean you had to be the one to type the
declaration. If it is declared anywhere in your scrips(s) then it is
a variable. As soon as you include My Library, it becomes your
library. ;)
|
|
0
|
|
|
|
Reply
|
David
|
8/14/2010 12:44:40 AM
|
|
On Aug 9, 1:34=A0am, Garrett Smith <dhtmlkitc...@gmail.com> wrote:
> On 2010-08-08 09:54 PM, David Mark wrote:
>
> > On Aug 8, 8:01 pm, Garrett Smith
>
> [...]
>
> > I cite the specification when the context calls for it. =A0For example,
> > three years ago you asked me to explain to you why 0 is not less than
> > null (presumably to avoid RTFM yourself).
>
> >http://groups.google.com/group/comp.lang.javascript/msg/55dd0547c67e99a1
>
> That's a good example of an on-topic post, so you're capable of posting
> on-topic.
As you well know, I've been posting on-topic for years. You often
disagree with my points for months on end, only to find out that you
were wrong all along. I know that upsets you, but it is hardly my
fault.
>
> There's a big difference between that and obnoxious noise, massive
> overquoting, and lazy and sloppy formatting that makes up the majority
> of your postings.
I picture this red-faced, foaming at the mouth, obsessive twit who
can't stand that they are virtually always wrong with regard to
browser scripting problems. Get some help.
|
|
0
|
|
|
|
Reply
|
David
|
8/14/2010 12:48:56 AM
|
|
On Aug 9, 1:49=A0am, Garrett Smith <dhtmlkitc...@gmail.com> wrote:
> On 2010-08-08 09:34 PM, David Mark wrote:
>
> > On Aug 8, 4:55 pm, Ry Nohryb<jo...@jorgechamorro.com> =A0wrote:
> >> On Aug 8, 9:40 pm, David Mark<dmark.cins...@gmail.com> =A0wrote:
>
> >>> On Aug 8, 10:17 am, Ry Nohryb<jo...@jorgechamorro.com> =A0wrote:
>
> >>>> NFEs ? Avoided ? Why ? NFEs are *not* the problem, the problem is
> >>>> Microsoft.
>
> >>> *Named* NFE's. (...)
>
> >> Yes, the truly, really wellnamedones:named-named-function-
> >> expressions :-)
>
> > Nice catch, jackass.
>
> Try repeating that looking in the mirror.
LOL. Stop trying to be me. You can't carry it off.
>
> Commenting on obvious typos is about what I'd
>
> > expect from you.
>
> Is there a contradiction here?
Nope.
>
> Either you're concerned about using correct terminology or you're not.
That's your typical generalized pigeonholing. About what I'd expect
from you.
> Frankly I don't care about what you call it;
Call what?
> you've shown repeated
> unwillingness to hold civil technical discussion, trying to discuss
> anything with you is pretty much a waste of time anyway, so call it
> whatever you want and I'll happily ignore you.
You are doing a great job of ignoring me. :) If you are planning to
start this week, realize that you'll never learn anything if you don't
pay attention. For example, you'd still be using the - in - operator
on host objects and confused about re-flows if you had been previously
ignoring me.
>
> if you tried to correct Jorge and then posted wrong information again
> (that's about the fourth post in a row from you I've read today that
> follows that pattern).
I did not post wrong information. As you well know, Jorge and I have
had this same discussion about fifty times. As I stressed once again,
*named* function expressions are to be avoided because of a problem in
IE. Jorge's ridiculous idea of "avoiding" IE is to be ignored.
|
|
0
|
|
|
|
Reply
|
David
|
8/14/2010 12:54:29 AM
|
|
On Aug 10, 12:05=A0pm, Dr J R Stockton <reply1...@merlyn.demon.co.uk>
wrote:
> In comp.lang.javascript message <i3o41e$pi...@news.eternal-
> september.org>, Sun, 8 Aug 2010 22:34:36, Garrett Smith
> <dhtmlkitc...@gmail.com> posted:
>
> >There's a big difference between that and obnoxious noise, massive
> >overquoting, and lazy and sloppy formatting that makes up the majority
> >of your postings.
>
> Those who write carelessly and in haste, without checking what they have
> written, are unlikely to be good programmers; this newsgroup is haunted
> by three prime examples. =A0David Mark posts more articles than Thomas
> Lahn and Garrett Smith put together.
>
I guess I write faster than they do. :) And please don't lump me in
any group with Garrett Smith, who can't seem to read, let alone write
coherent posts.
And is it your assertion that because I have a prolific posting
history I am a bad programmer? That doesn't follow (and is obviously
false).
|
|
0
|
|
|
|
Reply
|
David
|
8/14/2010 1:01:40 AM
|
|
On Aug 9, 2:09=A0am, Garrett Smith <dhtmlkitc...@gmail.com> wrote:
> On 2010-08-08 10:21 PM, David Mark wrote:
>
>
>
>
>
> > On Aug 9, 1:13 am, Garrett Smith<dhtmlkitc...@gmail.com> =A0wrote:
> >> On 2010-08-08 09:30 PM, David Mark wrote:
>
> >>> On Aug 8, 8:01 pm, Garrett Smith<dhtmlkitc...@gmail.com> =A0 =A0wrote=
:
> >>>> On 2010-08-08 03:05 PM, David Mark wrote:
>
> >>>>> On Aug 8, 6:01 pm, Garrett Smith<dhtmlkitc...@gmail.com> =A0 =A0 =
=A0wrote:
> >>>>>> On 2010-08-08 12:45 PM, David Mark wrote:
>
> >>>>>>> On Aug 8, 1:49 pm, John G Harris<j...@nospam.demon.co.uk> =A0 =A0=
=A0 =A0wrote:
> >>>>>>>> On Sat, 7 Aug 2010 at 22:08:07, in comp.lang.javascript, David M=
ark
> >>>>>>>> wrote:
>
> >>>>>>>> =A0 =A0 =A0 <snip>
> [...]
>
> > So stop popping in to technical discussions with personal attacks (and
> > then whining when you get smacked on the nose).
>
> >> The spam at least
> >> appears in a separate thread, so it can be easily ignored. Your trash
> >> appears all over the place.
>
> > I assume you've read the next post and are now crying in a corner
> > somewhere. =A0:)
>
> It sounds like you want to get a little more personal.
No, but it was funny that your latest dubious generalization (and lame
attempt at an insult) about who does or does not RTFM was so easily
proven false.
>
> Sissy flame wars are off-topic.
So stop with your lame-ass attempts at insults and you won't touch off
such "wars". Lately you talk about me more than you do JS. As such,
any comments about being OT are laughable.
> If you wanted to meet in person -- and
> that goes for anyone -- you could have just emailed me rather than post
> a sissydramaqueen act with keystrokes. You have my email address.
Again, PKB. If you have a problem with me, you can send an email
(which I will duly ignore). ;)
>
> I'm not getting hit in the nose and although your trash hurts my ideals
> for this NG, I'm surely not crying.
See above. You are just asking for another whipping.
|
|
0
|
|
|
|
Reply
|
David
|
8/14/2010 3:21:31 AM
|
|
On 2010-08-13 05:54 PM, David Mark wrote:
> On Aug 9, 1:49 am, Garrett Smith<dhtmlkitc...@gmail.com> wrote:
>> On 2010-08-08 09:34 PM, David Mark wrote:
>>
>>> On Aug 8, 4:55 pm, Ry Nohryb<jo...@jorgechamorro.com> wrote:
>>>> On Aug 8, 9:40 pm, David Mark<dmark.cins...@gmail.com> wrote:
>>
>>>>> On Aug 8, 10:17 am, Ry Nohryb<jo...@jorgechamorro.com> wrote:
>>
>>>>>> NFEs ? Avoided ? Why ? NFEs are *not* the problem, the problem is
>>>>>> Microsoft.
>>
>>>>> *Named* NFE's. (...)
>>
>>>> Yes, the truly, really wellnamedones:named-named-function-
>>>> expressions :-)
>>
[...]
>
>>
>> if you tried to correct Jorge and then posted wrong information again
>> (that's about the fourth post in a row from you I've read today that
>> follows that pattern).
>
> I did not post wrong information. As you well know, Jorge and I have
It's not "ATM", no! Its ATM *MACHINE!!!*
--
Garrett
|
|
0
|
|
|
|
Reply
|
Garrett
|
8/14/2010 6:15:57 AM
|
|
On Aug 14, 2:15=A0am, Garrett Smith <dhtmlkitc...@gmail.com> wrote:
> On 2010-08-13 05:54 PM, David Mark wrote:
>
>
>
>
>
> > On Aug 9, 1:49 am, Garrett Smith<dhtmlkitc...@gmail.com> =A0wrote:
> >> On 2010-08-08 09:34 PM, David Mark wrote:
>
> >>> On Aug 8, 4:55 pm, Ry Nohryb<jo...@jorgechamorro.com> =A0 =A0wrote:
> >>>> On Aug 8, 9:40 pm, David Mark<dmark.cins...@gmail.com> =A0 =A0wrote:
>
> >>>>> On Aug 8, 10:17 am, Ry Nohryb<jo...@jorgechamorro.com> =A0 =A0wrote=
:
>
> >>>>>> NFEs ? Avoided ? Why ? NFEs are *not* the problem, the problem is
> >>>>>> Microsoft.
>
> >>>>> *Named* NFE's. (...)
>
> >>>> Yes, the truly, really wellnamedones:named-named-function-
> >>>> expressions :-)
>
> [...]
>
> >> if you tried to correct Jorge and then posted wrong information again
> >> (that's about the fourth post in a row from you I've read today that
> >> follows that pattern).
>
> > I did not post wrong information. =A0As you well know, Jorge and I have
>
> It's not "ATM", no! Its ATM *MACHINE!!!*
Is it your position then that I don't know what an NFE is? If so, you
are on very thin ice considering the amount of time I've devoted here
recently trying to teach Jorge not to use them. But you already knew
that (even if you didn't read the bit you snipped).
So the question is, what is your motivation for such a juvenile (and
sloppy) outburst? To look like an idiot? And this from the off-topic
police?
You are a blithering buffoon. Who appointed this idiot to maintain
the FAQ anyway?
|
|
0
|
|
|
|
Reply
|
David
|
8/14/2010 7:01:25 AM
|
|
|
54 Replies
296 Views
(page loaded in 0.538 seconds)
Similiar Articles: Invoking python functions from TCL XMLRPC client - comp.lang.tcl ...Wrap a function - comp.lang.python Invoking python functions from TCL XMLRPC client - comp.lang.tcl ... new self invoking function - comp.lang.javascript... question about ... Classify Function - comp.soft-sys.matlabHi, I found out this problam occured also when I use this function directly on the ... Neural Network Classification - comp.soft-sys.matlab Hello all, I'm quite new to ... Functional Link Neural Networks - comp.soft-sys.matlabFor the MLP I use newff function. But I don't know what function to use for a ... one neuron, multiple inputs and a single output. Can someone help? I'm new at ... Formatting javascript in BBEdit or Textwrangler - comp.sys.mac ...BBEdit vs. Text Wrangler - comp.sys.mac.apps new self invoking function - comp.lang.javascript Formatting javascript in BBEdit or Textwrangler - comp.sys.mac ... too many input/output arguments - comp.soft-sys.matlabBut, as Walter says, until a complete and functional and self-consistent ... 1500) you would get an error about > attempting to invoke a script as a function. Controlling File Descriptor Flush - comp.unix.solarisMixing standard I/O library functions with read and write ... to write data in small "chunks", but will invoke a ... For more accurate atomicity, write a new version of ... Preselect list view entries - comp.lang.rexx::method initCategories self~calalog['names'] = .array~of ... other controls in this way: dlg = .propertySheet~new ... The values sent to the C functions are always strings. input & output in assembly - comp.lang.asm.x86Should all new drivers start out with ... What about the fact that CPU its self ... programming in win32 think, INVOKE is a processor instruction and exit is some function ... Simple code encryption (xor) problem - comp.lang.asm.x86 ...Hi, I'm new to assembler and to this group by the way. ... I posted this info on 19 Jul 2010 under the "Code self ... any write to DS: and execute the stuff at CS: could invoke ... GAWK: A fix for "missing file is a fatal error" - comp.lang.awk ...... PRELOAD method is good - obviously this syntax functions ... in case it does, so if we have a switch to invoke the "new ... file is a fatal error" - comp ... ... on a self ... 64 bit integer - comp.lang.c++.moderatedThe correct way to add a new type is >to give it a ... compiler to issue a diagnostic in the form of a self ... actually reject the program: > pedant.cpp: In function ... Can a procedure contain only a SELECT statement? - comp.databases ...If you need just to return value, you need a function. ... time, so "enterprise" had better find a new meaning. ... So when you invoke a procedure result are coming back ... delete columns csv file - comp.lang.awk... the command to gedit but all I got was a > blank new ... and FNR independently, it is possible to use these functions ... you) to quote enough context to make any posting self ... Does PAUSE have any Side Effect ?? - comp.lang.fortran... matrices & array operations, some of the new intrinsic functions ... so far, each run under a different scenario invoking ... NaN > c- renamed the source code (self-contained ... [comp.publish.cdrom] CD-Recordable FAQ, Part 1/4 - comp.publish ...Archive-name: cdrom/cd-recordable/part1 Posting-Frequency: monthly Last-modified: 2008/10/09 Version: 2.71 Send corrections and updates to And... javascript new self invoking function - Stack OverflowIt is weird because the purpose of defining a constructor is to be able to reuse it to create many objects. For your purpose, you can use this construct- javascript - self-invoking functions - Stack OverflowIt's the syntax of the language. If you want to in-place execute an ... javascript new self invoking function 7/25/2012 6:04:15 PM
|