I like dynamic this.
I favor hard-bound lexical |this| for standalone function calls only. Thats
where the problems are right now
The (this, ...) syntax seems unnecessarily gnarly - better to just default
to using base ref as |this| in a method call - since by now this is
expected behavior
On
e extra @s all over
the place would be too much.
- Russ
On Mon, Apr 9, 2012 at 1:46 PM, Herby Vojčík wrote:
> Hello,
>
> this is more a conceptual question post. But first some proposals that
> circulated in the list:
>
> 1. Dynamic-this enabled fat arrow functions.
>
>
On Mon, Apr 9, 2012 at 10:46 AM, Herby Vojčík wrote:
> Hello,
>
> this is more a conceptual question post. But first some proposals that
> circulated in the list:
>
> 1. Dynamic-this enabled fat arrow functions.
>
> (this, ...) => expr
> (this, ...) => { b
Hello,
this is more a conceptual question post. But first some proposals that
circulated in the list:
1. Dynamic-this enabled fat arrow functions.
(this, ...) => expr
(this, ...) => { body }
2. ABC (apply/bind/call) shortcuts.
thisobj::identifier(...args) // apply
thisobj::iden
On May 10, 2011, at 7:47 PM, Brendan Eich wrote:
> Usability is hard. I've seen zero evidence that CoffeeScript's fat-arrow is
> unusably terse and people are fooled into thinking it's as cheap as -> (if
> that's the concern). What is the problem?
The problem comes from my (limited) experience
>>> myfunc(param1, param2) -> { ... } // lexical this
>>> var obj = {
>>> mymethod: (this, param1, param2) -> { ... } // dynamic this
>>> }
>>
>> This is how Python handles methods. I think there were objections to this
>> approach,
, param2) -> { ... } // lexical this
>> var obj = {
>>mymethod: (this, param1, param2) -> { ... } // dynamic this
>> }
>
> This is how Python handles methods. I think there were objections to this
> approach, but unfortunately I can neither remember them nor f
e. Are newbies ever going to be able to handle this? If we are going to
overhaul function semantics, wouldn’t it make sense to adopt a more explicit
approach?
> myfunc(param1, param2) -> { ... } // lexical this
> var obj = {
> mymethod: (this, param1, param2) -> { ... } /
8 matches
Mail list logo