From: Garrett Smith on 21 Apr 2010 22:17 Richard Cornford wrote: > Garrett Smith wrote: >> Richard Cornford wrote: >>> Johannes Baagoe wrote: [...] >>> >>> As I am responsible for that construct's use in browser >>> scripting I >> >> The only way for that to be true > > The only way? > If someone else realize the possibility independently, then you cannot be responsible for that. [...] The closures article was influential. > >> I used anonymous-and-immediately-invoked-function and long >> before I had ever heard of anyone else doing that. > > But you didn't think anyone else would be sufficiently interested to > tell them at the time? > My interest in javascript was not high; but yes, I actually published an article around early 2004 about that. I am not proud of it because there are some things in it that are bad advice and the use of that was limited to what I wanted it for, which at that time, was not very sophisticated: <http://dhtmlkitchen.com/learn/js/singleton/> It cannot compare to the Closures article in the notes section. I did not know even about ECMA-262 at that time. I recall that I new what I local variable was, how to use a function of a constructor, and combined the two. -- Garrett comp.lang.javascript FAQ: http://jibbering.com/faq/
From: Johannes Baagoe on 24 Apr 2010 07:24 Dr J R Stockton : > I think 22! (1124000727777607680000) is represented exactly, You're right. It is of course greater than 2^53 (9007199254740992), but it has 19 factors 2 which are represented in the exponent(22! = 2^19 * 2143861251406875), so it should be. > but not 23!. That would indeed be impossible: 23! = 2^19 * 49308808782358125, and that odd factor is greater than 2^53. > 22! seems to be IEEE Double 444e77526159f06c. It is. > However, 22! does not convert exactly to String. Yes, that was what mislead me. Now, why is that? -- Johannes
From: Johannes Baagoe on 30 Apr 2010 09:35 Thomas 'PointedEars' Lahn : > So there is still good reason to use `arguments.callee' in code > supposed to be interoperable as long as the JScript bug is there > and JScript (through its being supported by MSHTML, primarily in IE) > is prevalent, unless one can reasonably factor recursion out of the > equation and avoid the issue entirely. It seems to me that another, quite simple way to avoid the issue entirely would be : var f = function(/* arguments */) { /* code including recursive call(s) to f */ }; wrapped in an outer function if one wants to avoid globals. OTOH, if `arguments` is really going to be deprecated, what happens to arguments in variable number ? If there is anything I would like to see changed about `arguments`, it is turning it into a proper Array, with shift, pop and the like. I hate Array.prototype.slice.call(arguments). -- Johannes
From: Jorge on 30 Apr 2010 13:35
On 30/04/10 18:54, Thomas 'PointedEars' Lahn wrote: > > My point is that at this point I am not willing to, and would strongly > recommend against, accept(ing) issues with JScript just to have perhaps a > performance gain from not using `arguments' everywhere else. Whether or > not strict mode is an opt-in (yes, it is), is irrelevant to that. s/arguments/arguments.callee/ Right ? -- Jorge. |