@name module API

Irakli Gozalishvili rfobic at gmail.com
Sat Apr 14 12:52:30 PDT 2012


I would also expect that  

let myName = Name() 

will work as it does with other built-ins
Regards
--
Irakli Gozalishvili
Web: http://www.jeditoolkit.com/


On Friday, 2012-04-13 at 20:20 , Brendan Eich wrote:

> Erik Arvidsson wrote:
> > We should really use ''new Name'' instead of ''create''.
> > 
> > import {Name} from '@name';
> > let myName = new Name;
> > 
> > instead of
> > 
> > module name = '@name';
> > let myName = name.create();
> > 
> 
> 
> To be less content-free in my +1, it seems to me one should always be 
> able to use an identifier as a pattern:
> 
> import Name from '@name';
> const myName = new Name;
> 
> 
> And the built-in module might be named "@std" instead, per 
> http://wiki.ecmascript.org/doku.php?id=harmony:modules_standard, so we'd 
> have
> 
> import Name from '@std';
> const myName = new Name;
> 
> 
> If we can agree that some <script> element variant imports * from "@std" 
> implicitly as a standard prelude, then we have:
> 
> 
> const myName = new Name;
> 
> 
> which seems winning to me.
> 
> /be
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org (mailto:es-discuss at mozilla.org)
> https://mail.mozilla.org/listinfo/es-discuss
> 
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120414/e54dc44d/attachment.html>


More information about the es-discuss mailing list