Re: Two kinds of [] (was: Re: shortcuts for defining block-local private names, plays nicely with @foo syntax)

2012-01-28 Thread Brendan Eich
Thaddee Tyl wrote: Related: this syntax doesn't prevent the user from naming its variable "at", does it? Not at all (heh). Contextual keyword is contextual (and not optional, so it will always be linking a module name to an MRL). /be ___ es-discus

Re: Two kinds of [] (was: Re: shortcuts for defining block-local private names, plays nicely with @foo syntax)

2012-01-28 Thread Thaddee Tyl
On Sat, Jan 28, 2012 at 1:10 AM, Brendan Eich wrote: >> Tom Van Cutsem >> January 27, 2012 10:53 AM >> >> >>    Off-topic: What is the recommended style for naming modules? >>    Capitalized and camel-cased? It’s nothing I couldn’t get used to, >>    but it seems like t

Re: Two kinds of [] (was: Re: shortcuts for defining block-local private names, plays nicely with @foo syntax)

2012-01-27 Thread Brendan Eich
Tom Van Cutsem January 27, 2012 10:53 AM Off-topic: What is the recommended style for naming modules? Capitalized and camel-cased? It’s nothing I couldn’t get used to, but it seems like the naming precedent would be JavaScript packages. Or is Reflect ca

Re: Two kinds of [] (was: Re: shortcuts for defining block-local private names, plays nicely with @foo syntax)

2012-01-27 Thread Tom Van Cutsem
2012/1/27 Axel Rauschmayer > Off-topic: What is the recommended style for naming modules? Capitalized > and camel-cased? It’s nothing I couldn’t get used to, but it seems like the > naming precedent would be JavaScript packages. Or is Reflect capitalized, > because it is a built-in module? > I h

Re: Two kinds of [] (was: Re: shortcuts for defining block-local private names, plays nicely with @foo syntax)

2012-01-27 Thread Axel Rauschmayer
Off-topic: What is the recommended style for naming modules? Capitalized and camel-cased? It’s nothing I couldn’t get used to, but it seems like the naming precedent would be JavaScript packages. Or is Reflect capitalized, because it is a built-in module? I love how this module is a new home fo

Re: Two kinds of [] (was: Re: shortcuts for defining block-local private names, plays nicely with @foo syntax)

2012-01-27 Thread Tom Van Cutsem
2012/1/23 Herby Vojčík > But it gets harder with getters and setters... maybe if there was an API > for simulating proper legacy foo[bar] and foo[bar]=baz, (Object.get, > Object.set?) generic [] could be dropped without much of a loss. > We'll have Reflect.get and Reflect.set, see < http://wiki.

Re: Two kinds of [] (was: Re: shortcuts for defining block-local private names, plays nicely with @foo syntax)

2012-01-24 Thread Herby Vojčík
Allen Wirfs-Brock wrote: On Jan 23, 2012, at 1:14 PM, Herby Vojčík wrote: Axel Rauschmayer wrote: Losing generic [] as a way to access all "native" properties of the object is big price. ... For the few remaining cases, Object.getProperty() (or something similar) should do just fine. Hm.

Re: Two kinds of [] (was: Re: shortcuts for defining block-local private names, plays nicely with @foo syntax)

2012-01-23 Thread Allen Wirfs-Brock
On Jan 23, 2012, at 1:14 PM, Herby Vojčík wrote: > Axel Rauschmayer wrote: >>> Losing generic [] as a way to access all "native" properties of the >>> object is big price. >> >> I wonder if it really is such a big price: isn’t [] mainly used for >> objects as maps from strings to values? Then yo

Re: Two kinds of [] (was: Re: shortcuts for defining block-local private names, plays nicely with @foo syntax)

2012-01-23 Thread Herby Vojčík
Axel Rauschmayer wrote: Losing generic [] as a way to access all "native" properties of the object is big price. I wonder if it really is such a big price: isn’t [] mainly used for objects as maps from strings to values? Then you should use something else in ES6, anyway (SimpleMap, possibly dic

Re: Two kinds of [] (was: Re: shortcuts for defining block-local private names, plays nicely with @foo syntax)

2012-01-23 Thread Axel Rauschmayer
> Losing generic [] as a way to access all "native" properties of the object is > big price. I wonder if it really is such a big price: isn’t [] mainly used for objects as maps from strings to values? Then you should use something else in ES6, anyway (SimpleMap, possibly dict, possibly other ma

Two kinds of [] (was: Re: shortcuts for defining block-local private names, plays nicely with @foo syntax)

2012-01-23 Thread Herby Vojčík
Allen Wirfs-Brock wrote: Below... Brendan Eich wrote: > Allen Wirfs-Brock > January 23, 2012 8:43 AM > On Jan 22, 2012, at 7:36 PM, Tab Atkins Jr. wrote: > ?.. > > const getIterator = Iterator.getIterator; > myCoolObject.prototype.@getIterator = function()