Matthew Robb schrieb:
What I'd really like to have in the language is the ability to store a
property access into a single binding
Notice that the https://github.com/zenparsing/es-function-bind proposal
does exactly this, at least for methods (and I don't think I would want
it for arbitrary a
On Fri, Jul 17, 2015 at 4:17 PM, Domenic Denicola wrote:
> I don't think this is possible to do in a memory-efficient way. I thus
> think it should not be easy, nor concise. Doing inefficient things should
> be painful and discouraged.
Funny. That's what I think about Promises, but I recognize
14
To: Domenic Denicola
Cc: Matthew Robb; es-discuss@mozilla.org >> es-discuss
Subject: Re: Instance bound class methods
Domenic, would you care to propose an alternative that is concise and memory
efficient if it is an anti-pattern?
That would be helpful and constructive (your comment,
ternative to allocation
> per method per constructed instance.
>
> /be
>
> Matthew Robb wrote:
>> Are there any proposals or any discussions around solving the problem of
>> instance bound class methods with some sugar?
>>
>> There are examples of people doing
Domenic, would you care to propose an alternative that is concise and memory
efficient if it is an anti-pattern?
That would be helpful and constructive (your comment, not so much).
> On Jul 13, 2015, at 8:27 AM, Domenic Denicola wrote:
>
> From: es-discuss [mailto:es-discuss-boun...@mozilla.o
FWIW I've just added an extra possible solution to what is a very common
problem:
https://github.com/zenparsing/es-function-bind/issues/17#issuecomment-120978833
it uses mixins, but I would personally vote +1 to have `::obj.method`
returning every time the same method.
Best Regards
On Mon, Jul 1
tion extraction from method, which is a pay-for-what-you-ask-for
> alternative to allocation per method per constructed instance.
>
> /be
>
> Matthew Robb wrote:
>
>> Are there any proposals or any discussions around solving the problem of
>> instance bound clas
From: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Brendan
Eich
> You're counting on the property assignment being moved into the constructor,
> where `this` is bound. In a class body in ES6 (without property assignment
> extension), especially in the top level where method d
> I am curious if https://github.com/zenparsing/es-function-bind would be
> related, since it would allow bound function calls to be made by using
> `obj::fn` while `obj.fn` would result in the unbound first class function.
>
Well, for that syntax proposal, it would be `::obj.fn`.
But see https:/
. The
> latter is what Java and C++ do. Then the trick is enabling first-class
> function extraction from method, which is a pay-for-what-you-ask-for
> alternative to allocation per method per constructed instance.
>
> /be
>
> Matthew Robb wrote:
>
>> Are there any prop
Java and C++ do. Then the trick is enabling
first-class function extraction from method, which is a
pay-for-what-you-ask-for alternative to allocation per method per
constructed instance.
/be
Matthew Robb wrote:
Are there any proposals or any discussions around solving the problem
of insta
This and arrow generators would be a nice thing to have.
> On Jul 13, 2015, at 11:42 PM, Matthew Robb wrote:
>
> Are there any proposals or any discussions around solving the problem of
> instance bound class methods with some sugar?
>
> There are examples of people doin
Are there any proposals or any discussions around solving the problem of
instance bound class methods with some sugar?
There are examples of people doing things like this:
https://github.com/reactjs/react-future/blob/master/01%20-%20Core/01%20-%20Classes.js#L31
My proposal would be to extend
13 matches
Mail list logo