One think I have suggested back in a time may has an interesting property to a private symbol sharing. What if private symbols were of "function" type instead of "object", where given a symbol 'foo'

foo(object, arg1, arg2, …)

desugars to

object[foo](arg1, arg2, …)

That would make symbol sharing as legit as sharing regular functions. In addition it would allow users to define / consume them in functional or OOP style depending on their preferences.

 

Regards
--
Irakli Gozalishvili
Web: http://www.jeditoolkit.com/

On 2013-08-02 at 13:46:52 , Brendan Eich ([email protected]) wrote:

\o/

/be

Brandon Benvie wrote:
> On 8/2/2013 1:31 PM, Erik Arvidsson wrote:
>> You can already use string literals as property names:
>>
>> ```js
>> class C {
>> "sys/iterator"() {}
>> }
>> ```
>
> Oh right, method syntax threw me off, but this is completely valid.
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to