Re: Separating a Hash type from Object

2007-07-30 Thread Garrett Smith
On 7/25/07, Lars T Hansen [EMAIL PROTECTED] wrote: On 7/25/07, Garrett [EMAIL PROTECTED] wrote: Lars T Hansen-2 wrote: On 7/25/07, Garrett [EMAIL PROTECTED] wrote: I see this as two issues. 1) The need for Collections/Data Structures. 2) The desire for shorthand access to

Array and Object Literal Types

2007-08-17 Thread Garrett Smith
It would be nice to have Array literal syntax declare it's ArrayType before the declaration of the array. For example: 1. var x : ArrayString = [ foo, bar, document.title, getAnotherString() ]; 2. var x = [ foo, bar, document.title, getAnotherString() ] : String; example 1 is more clear to

JSON Methods?

2007-09-01 Thread Garrett Smith
I was wondering about the new JSON methods: Object.prototype.toJSONString String.prototype.parseJSON to me, parseJSON seems like it should not be a String prototype method. I'm thinking about other parse type of methods, like Date.parse( s ); Here, it's fairly obvious what parse should return

Re: some errata in PDF

2007-09-04 Thread Garrett Smith
On 8/26/07, Lars T Hansen [EMAIL PROTECTED] wrote: On 8/26/07, Garrett Smith [EMAIL PROTECTED] wrote: http://developer.mozilla.org/es4/spec/spec.html Bottom of the page. I found that it was convenient for printing. Am I'm reading another out-of-date spec? Very

DateFormatter (was JSON Methods)

2007-09-06 Thread Garrett Smith
On 9/3/07, Lars T Hansen [EMAIL PROTECTED] wrote: On 9/3/07, Garrett Smith [EMAIL PROTECTED] wrote: On 9/3/07, Lars T Hansen [EMAIL PROTECTED] wrote: On 9/2/07, Garrett Smith [EMAIL PROTECTED] wrote: snip As we say around here, some prefer the mother and some prefer the daughter. There's

URI Proposal

2007-09-07 Thread Garrett Smith
I've decided to propose a URI class to deal with the handling of URIs that is so prevalent in Ajax apps and also in Flash and to a lesser extent, Adobe Reader. I propose this idea here because noticed that there are other places besides the web that can use it (Flash, Reader). A URI class could

Re: isPropertyEnumerable is going to stay broken?

2007-09-09 Thread Garrett Smith
sorry, propertyIsEnumerable. On 9/8/07, Garrett Smith [EMAIL PROTECTED] wrote: https://bugzilla.mozilla.org/show_bug.cgi?id=57048 In this bug, dated 2000, Brendan and David agreed that isPropertyEnumerable should check the prototype chain. It should not backwards compatibility

Re: isPropertyEnumerable is going to stay broken?

2007-09-10 Thread Garrett Smith
On 9/10/07, Brendan Eich [EMAIL PROTECTED] wrote: On Sep 10, 2007, at 2:21 PM, Garrett Smith wrote: And my point was that it appears to duplicate functionality of hasOwnProperty in a differently named method. The two functions are different: js var Op = Object.prototype; js Op.foo = 42

Fwd: isPropertyEnumerable is going to stay broken?

2007-09-11 Thread Garrett Smith
(fwd to list)... On 9/10/07, Brendan Eich [EMAIL PROTECTED] wrote: On Sep 10, 2007, at 2:41 PM, Neil Mix wrote: I think this is what Garrett is referring to: js function f() {} js f.prototype.foo = blah; blah js var x = new f(); js print(x.propertyIsEnumerable(foo)); false js

Re: isPropertyEnumerable is going to stay broken?

2007-09-17 Thread Garrett Smith
and cover more pages if there is more interest. If not, I'll let this rest here. Brendan Eich wrote: On Sep 8, 2007, at 10:06 PM, Garrett Smith wrote: https://bugzilla.mozilla.org/show_bug.cgi?id=57048 In this bug, dated 2000, Brendan and David agreed that isPropertyEnumerable should

Re: 13.2.2 [[Construct]], constructor, and [[Class]] (was __proto__)

2007-09-23 Thread Garrett Smith
On 9/22/07, liorean [EMAIL PROTECTED] wrote: On 22/09/2007, Garrett Smith [EMAIL PROTECTED] wrote: What I've found is that it's always giving wrong constructor property with inheritance chains. A -- B -- C c = (new C).constructor;// A snip I meant an enumerable superclass property

Re: 13.2.2 [[Construct]], constructor, and [[Class]] (was __proto__)

2007-09-23 Thread Garrett Smith
On 9/23/07, liorean [EMAIL PROTECTED] wrote: On 23/09/2007, Garrett Smith [EMAIL PROTECTED] wrote: 2. (new function(){}).constructor should be Function. On Sep 23, 2007, at 8:59 AM, liorean wrote: I agree. And in ES3 it is, unless the function either: On 23/09/2007, Brendan Eich

Re: 13.2.2 [[Construct]], constructor, and [[Class]] (was __proto__)

2007-09-23 Thread Garrett Smith
On 9/23/07, liorean [EMAIL PROTECTED] wrote: On 23/09/2007, Garrett Smith [EMAIL PROTECTED] wrote: Function objects get a non-enumerable constructor. function F(){}; F.constructor === Function; // true F.prototype.hasOwnProperty('constructor'); //true F.prototype.propertyIsEnumerable

Re: 13.2.2 [[Construct]], constructor, and [[Class]] (was __proto__)

2007-09-23 Thread Garrett Smith
On 9/23/07, Brendan Eich [EMAIL PROTECTED] wrote: On Sep 23, 2007, at 12:22 PM, Garrett Smith wrote: in no case is the value of (new function(){}).constructor Function. It shouldn't be, but it is in OSX Ref Impl. (I did not build this). js (new function(){}).constructor [function

Re: isPropertyEnumerable is going to stay broken?

2007-09-24 Thread Garrett Smith
On 9/10/07, Brendan Eich [EMAIL PROTECTED] wrote: On Sep 10, 2007, at 2:21 PM, Garrett Smith wrote: The fact that the method was called propertyIsEnumerable instead of isPropertyEnumerable is not great, but the way propertyIsEnumerable is designed is confusing to developers. I've never

Re: New Feature to JS 1.7

2007-10-08 Thread Garrett Smith
On 9/24/07, Brendan Eich [EMAIL PROTECTED] wrote: On Sep 24, 2007, at 10:51 AM, Garrett Smith wrote: http://wiki.ecmascript.org/doku.php?id=proposals:maintenance_of_es3 The docs for ES3 are gonna be updated? No commitment from the group yet to do this. Including some changes

Re: New Feature to JS 1.7

2007-10-08 Thread Garrett Smith
On 10/8/07, Brendan Eich [EMAIL PROTECTED] wrote: On Oct 7, 2007, at 11:41 PM, Garrett Smith wrote: I personally believe that the unsound, untestable/non-executable ES3 spec is a rathole we should avoid. The errata (which are not complete by a long shot) that we have hosted at http

Type Checking?

2007-10-10 Thread Garrett Smith
Typechecking is a problem. typeof is limited and allows host objects to return anything. The problem is that some host objects return function, for example, a NodeList in Safari. This is perfectly legal, according to the spec. Checking instanceof between frames doesn't work. var i =

Re: Type Checking?

2007-10-10 Thread Garrett Smith
On 10/10/07, Brendan Eich [EMAIL PROTECTED] wrote: On Oct 10, 2007, at 3:53 PM, Garrett Smith wrote: Typechecking is a problem. typeof is limited and allows host objects to return anything. The problem is that some host objects return function, for example, a NodeList in Safari

Re: Type Checking?

2007-10-11 Thread Garrett Smith
Incomplete sentence Microsoft often says that it is necessary to retain backwards compatibility. I would hope they would [not continue on this path.] -- EDIT. ___ Es4-discuss mailing list Es4-discuss@mozilla.org

Re: Type Checking?

2007-10-11 Thread Garrett Smith
On 10/11/07, Brendan Eich [EMAIL PROTECTED] wrote: On Oct 11, 2007, at 8:02 PM, Garrett Smith wrote: If you want to apply or call a non-function callable, use Function.apply(callable, thisp, argArray) or Function.call(callable, thisp, arg1, ...argN). So these are equivalent

Re: Object.prototype.clone

2007-10-21 Thread Garrett Smith
On 10/21/07, Peter Michaux [EMAIL PROTECTED] wrote: Hi, Is there a plan for a clone function in ES4? Object.prototype.clone = function() { function F() {} F.prototype = o; return new F(); }; The earliest reference I have found to this function is a post by Lasse

Re: is ES4 getting too bloated?

2007-10-21 Thread Garrett Smith
(fwd to list - I clicked the wrong button again...) On 10/21/07, Brendan Eich [EMAIL PROTECTED] wrote: I know of two industry-scale implementations under way, in addition to Mozilla's Tamarin project, and Michael O'Brien (mbedthis.com), all implementing ES4 in the next six to nine months.

Re: Object.prototype.clone

2007-10-21 Thread Garrett Smith
On 10/21/07, Kris Zyp [EMAIL PROTECTED] wrote: http://javascript.crockford.com/prototypal.html It is the act of creating a object that inherits from/delegates to the provided object. Peter is suggesting sugar for one of the important mechanisms in a prototypal language. I believe the copy

Re: Object.prototype.clone

2007-10-22 Thread Garrett Smith
cloneObject( this ); // Error if this is window. // enumeration is partially broken in IE, this loop will sometimes fail for( var property in srcObj ) On 10/22/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have clone objects like this:

Re: Chris Wilson: What I think about ES4

2007-11-03 Thread Garrett Smith
On 11/3/07, Nicolas Cannasse [EMAIL PROTECTED] wrote: After the heated debate, I took time to write my opinion on the subject, for what it's worth : Debate? Where? I didn't see any debate on Chris' blog. It looked more like something we could expect to see from American politicians; or a good

Re: Chris Wilson: What I think about ES4

2007-11-04 Thread Garrett Smith
On 11/4/07, liorean [EMAIL PROTECTED] wrote: On 04/11/2007, Mitch Skinner [EMAIL PROTECTED] wrote: Nicolas Cannasse wrote: Just curious, but am I the only one having trouble posting replies to Chris' blog? I posted a response to his response and answered his question that he asked me;

Re: Chris Wilson: What I think about ES4

2007-11-04 Thread Garrett Smith
On 11/4/07, liorean [EMAIL PROTECTED] wrote: On 04/11/2007, Mitch Skinner [EMAIL PROTECTED] wrote: Nicolas Cannasse wrote: Just curious, but am I the only one having trouble posting replies to Chris' blog? I posted a response to his response and answered his question that he asked me;

.newApply() ?

2007-11-10 Thread Garrett Smith
I know it's too late for a proposal, but I keep wanting a couple of things for AOP stuff. One is a newApply Creational = { getByNode : function(el){ if(!this.hasOwnProperty(instances)) this.instances = {}; return this.instances.hasOwnProperty(el.id) this.instances[el.id] ||

Re: ES3 quasi incompatibilities

2007-11-11 Thread Garrett Smith
Function findDuplicate is more like mark duplicates. The side effect is that it adds a __marker property to each object. As it stands, this function can not be called more than once. The second call might be passed a different array, but containing one of those objects that had the __marker left

InterType Declarations, Cross-Cutting - how to in ES4?

2007-11-11 Thread Garrett Smith
InterType Declarations InterType Declarations are a useful Iand popular) way of adding functionality to an object, usually to the prototype of a constructor. Lets say I have a class Widget that I want to borrow from: class Widget { private function Widget(){} static { getByNode :

Re: ES3 quasi incompatibilities

2007-11-11 Thread Garrett Smith
On Nov 11, 2007 7:18 PM, Yuh-Ruey Chen [EMAIL PROTECTED] wrote: Garrett Smith wrote: JavaScript does not provide basic functionality for unique collections. It's trivial to implement an efficient Set class even in ES3 (with certain restrictions on the type of the key) - just use objects

Exception handling vs. hasNext()

2007-11-16 Thread Garrett Smith
Which is better? var nodes : int; var widgetMap = Widget.instances; // a map. var it:Iteratorstring = widgetMap.getKeys(); -- this: -- try { widgetMap.get(it.next()).hide(); } catch(Exception e) { if(e instanceof StopIteration) { } } -- or this: -- while(it.hasNext()) {

Exception handling vs. hasNext()

2007-11-16 Thread Garrett Smith
to keep clean with a hasNext/next pattern. On Nov 16, 2007 5:30 PM, Garrett Smith [EMAIL PROTECTED] wrote: Which is better? var nodes : int; var widgetMap = Widget.instances; // a map. var it:Iteratorstring = widgetMap.getKeys(); -- this: -- try { widgetMap.get(it.next

Function inside if statement?

2008-02-05 Thread Garrett Smith
if(a) { function b(){ } } A block can contain statements. A statement can't start with the function keyword. Mozilla's Core JavaScript guide explains that of |b| should be evaluated as a functionExpression, but this isn't right. Source:

Re: Greedy triple-quoted string literals

2008-02-20 Thread Garrett Smith
On Feb 19, 2008 10:21 AM, liorean [EMAIL PROTECTED] wrote: On Feb 18, 2008 1:17 PM, liorean [EMAIL PROTECTED] wrote: On 19/02/2008, Garrett Smith [EMAIL PROTECTED] wrote (o.f)(); // =o This should be window. No it shouldn't. The grouping syntax specifically doesn't call GetValue

Date Format?

2008-03-03 Thread Garrett Smith
Will ES4 have a simple date formatter? ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss

Re: ES4 draft: Function

2008-03-13 Thread Garrett Smith
Hi Dustin, Well it does, apparently it was called the splat operator, which (to me) sounds a better than spread. I think it works like:- var args = [12, true]; new C(...args); function C( count, isSemiAnnual) { } - Maybe one of guys writing the specs can comment on that. It can be hacked in

Re: ES4 draft: Error classes

2008-03-20 Thread Garrett Smith
On Tue, Mar 18, 2008 at 12:05 PM, Lars Hansen [EMAIL PROTECTED] wrote: -Original Message- From: Garrett Smith [mailto:[EMAIL PROTECTED] Sent: 18. mars 2008 11:57 To: Lars Hansen Cc: es4-discuss Discuss Subject: Re: ES4 draft: Error classes On Mon, Mar 17, 2008 at 12

Re: Array Generics and null

2008-03-22 Thread Garrett Smith
On Sat, Mar 22, 2008 at 9:01 AM, John Resig [EMAIL PROTECTED] wrote: Hello all - It seems like there could be a couple solutions: Objects that are not capable of running in an Array-generic should not be attempted to run. Would it make sense to use - like - for all the Array generics? Is

Fwd: Array Generics and null

2008-03-23 Thread Garrett Smith
, 2008 at 12:06 AM, Dean Edwards [EMAIL PROTECTED] wrote: I assume you didn't intend to send this just to me. I do that a lot too - click reply instead of replay all. :-) -dean Garrett Smith wrote: Is there typed null? If so, then typed null could typecheck for Array-like-ness

Fwd: Array Generics and null

2008-03-24 Thread Garrett Smith
-- Forwarded message -- From: Garrett Smith [EMAIL PROTECTED] Date: Mon, Mar 24, 2008 at 11:27 AM Subject: Re: Array Generics and null To: Dean Edwards [EMAIL PROTECTED] On Mon, Mar 24, 2008 at 10:31 AM, Dean Edwards [EMAIL PROTECTED] wrote: Mike Shaver wrote: On Sun, Mar

Re: ES4 draft: the global object

2008-03-25 Thread Garrett Smith
There are some global functions that I think should be deprecated and moved to a relevant class. encodeURIComponent et al have nothing to do with the Global object. Same with isNaN, isFinite. These should be deprecated and moved to the appropriate object. In the case of encodeURIComponent, that

Re: ES4 draft: the global object

2008-03-25 Thread Garrett Smith
surprised it's been hanging around in for so long. Garrett sniip On Tue, Mar 25, 2008 at 07:12, Garrett Smith [EMAIL PROTECTED] wrote: snip -- erik ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss

Re: ES4 draft: the global object

2008-03-25 Thread Garrett Smith
On Tue, Mar 25, 2008 at 8:13 AM, Erik Arvidsson [EMAIL PROTECTED] wrote: Take Object.prototype.eval, for example. Nobody uses that much anymore. If it's removed from Mozilla, probably some pages will break, but not that many. Most people know better than to use that. I'm surprised it's

Re: complexity tax

2008-03-26 Thread Garrett Smith
On Wed, Mar 26, 2008 at 8:23 AM, Douglas Crockford [EMAIL PROTECTED] wrote: Brendan Eich wrote: And over-minimizing a language imposes a complexity tax on programmers using it. That is true. To decide whether to evolve JS or shrink it, you need only look at two things: 1) problems

Re: Date Format?

2008-03-31 Thread Garrett Smith
2008/3/31 Nathan de Vries [EMAIL PROTECTED]: On Tue, 2008-04-01 at 00:39 +0200, Igor Bukanov wrote: Date.prototype.toLocaleFormat(format) in SpiderMonkey provides access exactly to strftime functionality. As with prior discussion regarding PTC, being in SpiderMonkey is relatively

Re: Class method addition and replacement (was Re: AOP Compatibility)

2008-04-06 Thread Garrett Smith
On Thu, Apr 3, 2008 at 5:20 PM, Peter Hall [EMAIL PROTECTED] wrote: If you want mutability, you can define methods as vars in the first place. class Foo { // can be modified on a per-instance basis public var f : function (a:T):S = function (a:T):S { return null; } } A

Re: ES4 draft: assert expression

2008-04-16 Thread Garrett Smith
Sometimes errors might happen outside of an assert. Then the developer would have to try to rely on other things, like Spidermonkey's error.lineNumber and error.stack, or even window.onerror, even though it is buggy. It would be useful to get more error detail for free (w/o having to predefine

Re: Date Format?

2008-04-17 Thread Garrett Smith
On Tue, Apr 1, 2008 at 1:36 AM, Robert Sayre [EMAIL PROTECTED] wrote: 2008/3/31 Nathan de Vries [EMAIL PROTECTED]: Without being part of a standard such as ES4... It is a library problem. The ES4 language spec is not the place to fix every standard library deficiency. That's funny.

Re: ES4 draft: Object

2008-05-15 Thread Garrett Smith
That sore thumb propertyIsEnumerable. propertyIsEnumerable, as a setter, sets the DontEnum flag for the object's own property. A value of 'false' makes the prop not show up in - for in. propertyIsEnumerable, as a getter, gets the value of the negation of the DontEnum flag, and does not check the

Re: ES3.1 Draft: Array generics

2008-05-31 Thread Garrett Smith
2008/5/19 Pratap Lakshman (VJ#SDK) [EMAIL PROTECTED]: I have uploaded to the wiki a draft proposal (link) for Array generics. I have extracted the Array portion of the ES3 spec, added a rationale (with hyperlinks) at the beginning, and made relevant changes to the included section 15.4 text,

Fwd: ES3.1 Draft: Array generics

2008-05-31 Thread Garrett Smith
fwd to list. On Sat, May 31, 2008 at 1:44 AM, Garrett Smith [EMAIL PROTECTED] wrote: 2008/5/19 Pratap Lakshman (VJ#SDK) [EMAIL PROTECTED]: It would be sufficient and more correct to say: throw a TypeError rather than throw a TypeError exception So it should probably read one of:- 1

Fwd: ES3.1 Draft: Array generics

2008-06-08 Thread Garrett Smith
-subscribers are automatically rejected. Please subscribe to the list first before attempting to post, or ensure that you are posting using the address you subscribed with. -- Forwarded message -- From: Garrett Smith [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED], es4

Re: ES3.1 Draft: Array generics

2008-06-08 Thread Garrett Smith
On Sun, Jun 8, 2008 at 2:50 PM, Pratap Lakshman (VJ#SDK) [EMAIL PROTECTED] wrote: Garrett, I apologize. I was not ignoring you. Yes, I am interested in feedback! The initial Array generics proposal did not include the thisObj param as it was felt that it could open the door to some security

Re: ES3.1 Draft: Array generics

2008-06-08 Thread Garrett Smith
On Sun, Jun 8, 2008 at 2:50 PM, Pratap Lakshman (VJ#SDK) [EMAIL PROTECTED] wrote: Garrett, I apologize. I was not ignoring you. Yes, I am interested in feedback! OK, but you seem to have misunderstood me. The initial Array generics proposal did not include the thisObj param as it was felt

Re: More string indexing semantics issues

2008-06-25 Thread Garrett Smith
2008/6/24 Allen Wirfs-Brock [EMAIL PROTECTED]: Assuming the string index semantics I defined in my previous message, what should the effect of setting a numeric property on a string whose property name is a valid character position into the string? For example: var s = new String(abc)

Re: More string indexing semantics issues

2008-06-25 Thread Garrett Smith
On Wed, Jun 25, 2008 at 1:49 PM, Maciej Stachowiak [EMAIL PROTECTED] wrote: On Jun 25, 2008, at 1:33 PM, Garrett Smith wrote: On Wed, Jun 25, 2008 at 1:25 AM, Maciej Stachowiak [EMAIL PROTECTED] wrote: On Jun 24, 2008, at 11:45 PM, Garrett Smith wrote: (putting this back on the list

Fwd: Side-effects of some Array methods ...

2008-06-27 Thread Garrett Smith
Back to list - On Fri, Jun 27, 2008 at 1:27 PM, Brendan Eich [EMAIL PROTECTED] wrote: On Jun 27, 2008, at 6:51 AM, Pratap Lakshman (VJ#SDK) wrote: The side effect is as follows: if this does not have a length property, it ends up getting one; if this does have a length property, but is not

Fwd: Side-effects of some Array methods ...

2008-06-27 Thread Garrett Smith
to list - On Fri, Jun 27, 2008 at 3:04 PM, Brendan Eich [EMAIL PROTECTED] wrote: On Jun 27, 2008, at 2:07 PM, Garrett Smith wrote: A program that called pop() on an object w/no length would know right away if it failed. Why do you say that? I worded that very poorly. It was in response

Re: Side-effects of some Array methods ...

2008-06-27 Thread Garrett Smith
On Fri, Jun 27, 2008 at 3:57 PM, Brendan Eich [EMAIL PROTECTED] wrote: On Jun 27, 2008, at 3:45 PM, Garrett Smith wrote: to list - I am not the one replying to sender only -- all of my replies to you have cc'ed the list. I know. I had a mistake and hit 'Reply'. Then, realizing that, I put

Re: Newly revised Section 10 for ES3.1.

2008-07-09 Thread Garrett Smith
2008/7/9 Allen Wirfs-Brock [EMAIL PROTECTED]: I've just finished reworking section 10 to better accommodate block scoped function declarations and const statements. In the course of this I had to make various decisions about the semantics. The primary purpose of this message is to provide

Re: ES3.1 Object static methods rationale document

2008-07-16 Thread Garrett Smith
On Wed, Jul 16, 2008 at 1:16 PM, Allen Wirfs-Brock [EMAIL PROTECTED] wrote: -Original Message- From: Brendan Eich [mailto:[EMAIL PROTECTED] Right now, the best I can come up with is that it should be a relatively efficient way to test for the existence of a possibly inherited

Re: ES3.1 Object static methods rationale document

2008-07-16 Thread Garrett Smith
2008/7/15 Allen Wirfs-Brock [EMAIL PROTECTED]: I've up loaded to the wiki a new document titled: Proposed ECMAScript 3.1 Static Object Functions: Use Cases and Rationale A couple of questions for you: My first question: How does an ES3.1 sealed object relate to fixtures? __| ES

Re: ES3.1 Object static methods rationale document

2008-07-17 Thread Garrett Smith
On Thu, Jul 17, 2008 at 8:37 AM, John Resig [EMAIL PROTECTED] wrote: I wanted to bring up some further evidence for the widespread use of an extend() method. Here are the top 5 JavaScript libraries and their associated versions of Object.extend(): There are a couple points that are very

Re: ES3.1 Object static methods rationale document

2008-07-18 Thread Garrett Smith
On Fri, Jul 18, 2008 at 7:39 AM, Allen Wirfs-Brock [EMAIL PROTECTED] wrote: John, Thanks for pulling together all the various versions of Object.extend. Not all. It's useful to have them in one place. There are a couple of things you mentioned that I wanted to clarify. Neither

Re: ES3.1 Object static methods rationale document

2008-07-18 Thread Garrett Smith
On Fri, Jul 18, 2008 at 10:56 AM, John Resig [EMAIL PROTECTED] wrote: Not true. YAHOO.lang.extend uses prototypal inheritance. YAHOO.lang.extend is similar in name only - YAHOO.lang.augmentObject is the one that's actually similar to the functionality used by other code bases. You're prev

Re: ES3.1 Object static methods rationale document

2008-07-18 Thread Garrett Smith
On Wed, Jul 16, 2008 at 5:50 PM, Maciej Stachowiak [EMAIL PROTECTED] wrote: On Jul 16, 2008, at 4:10 PM, Allen Wirfs-Brock wrote: [snip] 1) It seems like Object.clone as you have described it is not suitable for the mixin type use case where an object gets properties/methods from two

Re: ES3.1 Object static methods rationale document

2008-07-18 Thread Garrett Smith
On Fri, Jul 18, 2008 at 12:40 PM, John Resig [EMAIL PROTECTED] wrote: You're prev response seems to have come from the discussion of Object.create. No? We've been discussing the viability of a new Object.extend() method to be introduced in ES3.1. The title of the thread is object static

Re: ES3.1 Object static methods rationale document

2008-07-18 Thread Garrett Smith
On Fri, Jul 18, 2008 at 2:02 PM, Allen Wirfs-Brock [EMAIL PROTECTED] wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:es4-discuss- [EMAIL PROTECTED] On Behalf Of Garrett Smith Sent: Friday, July 18, 2008 12:28 PM ... You're prev response seems to have come from

Re: How to escape implicit 'with (this)' of a method body

2008-08-01 Thread Garrett Smith
On Fri, Aug 1, 2008 at 1:03 PM, Maciej Stachowiak [EMAIL PROTECTED] wrote: On Jul 31, 2008, at 5:24 AM, Dave Herman wrote: We should take this problem seriously. ... Dynamic scope is very bad. Specifically: - Classes are supposed to provide integrity, but dynamic scope makes the

Re: ECMAScript Harmony

2008-08-15 Thread Garrett Smith
On Wed, Aug 13, 2008 at 2:26 PM, Brendan Eich [EMAIL PROTECTED] wrote: It's no secret that the JavaScript standards body, Ecma's Technical Committee 39, has been split for over a year, with some members favoring ES4, a major fourth edition to ECMA-262, and others advocating ES3.1 based on the