I suppose makeLambdaFunction could be "inlined" (possibly into a static 
factory, one per class), with the 'lambda' then generated with the proper 
number of formal arguments to "initialize" its 'length' property? Would 
that hurt "optimizability" a lot?
Or is that not worth it (too much of an edge case) and the static factory 
(of a wrapper function then) should rather be implemented with JSNI? (or 
the equivalent for j2cl)

On Tuesday, June 27, 2017 at 6:41:03 PM UTC+2, Roberto Lublinerman wrote:
>
> You can call it a missing feature. Clearly not a bug, not everything that 
> can be done in JS is available from Java with interop. For these situations 
> you probably want to have some JS stubs.
>
> On Tue, Jun 27, 2017 at 1:09 AM, Vassilis Virvilis <[email protected]> 
> wrote:
>
>> Ok guys this is the last one - I promise.
>>
>> Originally posted in gwt-users.
>>
>> Does this count as a bug or at least as a missing feature?
>>
>> Thanks
>>
>> ---------- Forwarded message ----------
>> From: Vassilis Virvilis <[email protected]>
>> Date: Mon, Mar 6, 2017 at 4:08 PM
>> Subject: jsinterop: @JsFunction .length always 0
>> To: [email protected]
>>
>>
>> Hi,
>>
>> in D3 the bisect function takes a function that can be a comparator or an 
>> accessor.
>>
>> D3 internall figures it out by counting provided function arguments 
>> length via f.length 
>> https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Function/length
>>
>> Trying to pass a java @JsFunction fails because @JsFunction objects are 
>> lambda with zero arguments that wrap samMethod.apply() call
>>
>> Any ideas? Should I file this as a bug?
>>
>>
>> -- 
>> Vassilis Virvilis
>>
>>
>>
>> -- 
>> Vassilis Virvilis
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "GWT Contributors" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAKbOjEx1_jOohikJ7nBAfpsE%3DJHtnD6M31PibMzjvcjLn7G1fw%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAKbOjEx1_jOohikJ7nBAfpsE%3DJHtnD6M31PibMzjvcjLn7G1fw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/a07991bc-7767-46cb-80fd-655e1809f15b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to