ES4 draft: Name

Lars Hansen lhansen at adobe.com
Thu Mar 6 14:00:50 PST 2008


It depends on whether we care about object identity or not for immutable
objects like Name that don't have special support from the language (eg
in comparison operators).  Useful question, though.  I will ponder it.
 
--lars


________________________________

	From: Yuh-Ruey Chen [mailto:maian330 at gmail.com] 
	Sent: 5. mars 2008 21:55
	To: Lars Hansen
	Cc: es4-discuss at mozilla.org
	Subject: Re: ES4 draft: Name
	
	
	Lars Hansen wrote: 



		Name (a, b=...)


		Description 

		The Name class object called as a function creates a new
Name object by passing its arguments a and b to the Name constructor. 

		Returns 

		The Name class object called as a function returns a
Name object. 

		Implementation 

		static meta function invoke(a, b=undefined): Name
		    new Name(a, b);
		  


	If a is already a Name, shouldn't Name(a) simply return a? Not
sure what the policy on this is, but if you've changed Map to work
similarly, then I don't see why not here as well.
	
	-Yuh-Ruey Chen
	

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.mozilla.org/pipermail/es-discuss/attachments/20080306/7d15806e/attachment-0002.html 


More information about the Es4-discuss mailing list