Re: [JSMentors] Re: JavaScript architecture

2011-07-12 Thread Juriy Zaytsev
On Tue, Jul 12, 2011 at 5:54 PM, austincheney austin.che...@travelocity.com wrote: [...] 3) I ALWAYS use anonymous functions assigned to variables. There was some quote that went around from Brendan Eich that the function is too long and makes functional coding diffecult to read, but because

Re: [JSMentors] patching the Function object?

2011-03-24 Thread Juriy Zaytsev
Function call — which `foo()` an `nsui()` are — has little to do with `Function.prototype.call`. Function call (such as `foo()`) delegates to internal [[Call]] method of whatever object you're invoking. In case of `foo()` it's [[Call]] of `foo` function object. Unless the implementation you're

Re: [JSMentors] Re: Difference between eval on v8 (chrome) and spidermonkey (firefox)

2011-03-01 Thread Juriy Zaytsev
On Mon, Feb 28, 2011 at 9:57 AM, mcot atm1...@gmail.com wrote: I want to reassign eval but still be able to do indirect calls. Is there any possible way to do this in chrome? Not that I know of. If you reassign `eval` to something else, than call that something else — that's an indirect eval

Re: [JSMentors] Difference between eval on v8 (chrome) and spidermonkey (firefox)

2011-02-27 Thread Juriy Zaytsev
On Fri, Feb 25, 2011 at 6:14 PM, mcot atm1...@gmail.com wrote: I have some sample code below that generates a different result between browsers. I *think* chrome is doing the wrong thing, but I wanted to ask here first. function func(param) { console.log(param.x)

Re: [JSMentors] Re: Configuration Object API

2011-02-15 Thread Juriy Zaytsev
On Tue, Feb 15, 2011 at 8:22 AM, Scott Sauyet scott.sau...@gmail.comwrote: Asen Bozhilov wrote: [...] It seems API is enough useful and convenient, I am interested in the opinion of the others members, too. Only one issue with: merge = function(base, ext) { //... }; I

Re: [JSMentors] Re: Note 4. Two words about hoisting.

2011-02-09 Thread Juriy Zaytsev
On Wed, Feb 9, 2011 at 1:44 AM, Angus Croll anguscr...@gmail.com wrote: Very nice article Dmitry. I share your philosophy of more important to understand the mechanics than judge it good or bad Side note about FEs. I normally prefer over FDs, partly because they make top down reading more

Re: [JSMentors] Re: global object property access

2011-02-04 Thread Juriy Zaytsev
On Fri, Feb 4, 2011 at 10:54 PM, mcot atm1...@gmail.com wrote: Hi. I am still reading up on this but here are some more tests I have run: console.log(typeof(foo) === 'undefined'); // true -- doesn't raise reference error. foo;

Re: [JSMentors] localStorage - special setter and getter

2011-02-03 Thread Juriy Zaytsev
On Thu, Feb 3, 2011 at 8:09 AM, Asen Bozhilov asen.bozhi...@gmail.comwrote: Juriy Zaytsev : But is it a bug really? As far as I know, web storage spec ( http://dev.w3.org/html5/webstorage/) makes no clarification on whether interface members are writable; or enumerable/configurable

Re: [JSMentors] localStorage - special setter and getter

2011-02-02 Thread Juriy Zaytsev
On Sat, Jan 29, 2011 at 6:35 PM, Asen Bozhilov asen.bozhi...@gmail.comwrote: The last week I explored some things about `localStorage'. The most interesting and meanwhile confusing things are described in two articles about `localStorage': URL:

Re: [JSMentors] Looking for a good compatibility table

2011-01-16 Thread Juriy Zaytsev
On Sun, Jan 16, 2011 at 12:04 PM, Trygve Lie p...@trygve-lie.com wrote: Hi I'm working on a small and basic JavaScript introduction I'm going to hold. In this introduction I would like to point to a good compatibility table. Personally I like kangax's ECMAScript 5 compatibility table:

Re: [JSMentors] Re: Can I dynamically make a prototype link?

2010-12-19 Thread Juriy Zaytsev
On Sun, Dec 19, 2010 at 3:29 AM, fernando trasvina trasv...@gmail.comwrote: On Dec 19, 2010, at 2:17 AM, Garrett Smith wrote: On 12/18/10, Juriy Zaytsev kan...@gmail.com wrote: On Sun, Dec 19, 2010 at 2:02 AM, Garrett Smith dhtmlkitc...@gmail.comwrote: [...] It is the `new` operator

Re: [JSMentors] Can I dynamically make a prototype link?

2010-12-19 Thread Juriy Zaytsev
On Sun, Dec 19, 2010 at 7:21 AM, Lasse Reichstein reichsteinatw...@gmail.com wrote: On Sun, 19 Dec 2010 08:39:00 +0100, Juriy Zaytsev kan...@gmail.com wrote: __proto__ also appears to be marked as deprecated in current version of corresponding MDN docs. I wouldn't be surprised to see it go

Re: [JSMentors] Re: Can I dynamically make a prototype link?

2010-12-18 Thread Juriy Zaytsev
On Sun, Dec 19, 2010 at 2:02 AM, Garrett Smith dhtmlkitc...@gmail.comwrote: On 12/18/10, Ezequiel ezequ...@ziggyism.com wrote: On Dec 17, 2:37 am, Juriy Zaytsev kan...@gmail.com wrote: var beget = (function() { function F(){ }; return function(o) { F.prototype = o; return

Re: [JSMentors] Can I dynamically make a prototype link?

2010-12-18 Thread Juriy Zaytsev
On Fri, Dec 17, 2010 at 8:43 PM, Asen Bozhilov asen.bozhi...@gmail.comwrote: Garrett Smith wrote: Juriy Zaytsev wrote: var beget = (function() { function F(){ }; All good except for the extra empty statement there. AYK, semicolon is not needed after the FD. Yes! Thanks