Operator overloading

David Chase david.r.chase at oracle.com
Fri Sep 5 19:22:20 UTC 2014


Remi, I can’t speak for him, but supposing the libraries for Arrays 2.0 turn out okay or better (it’s possible).
Do you prefer

   a.set(times(plus(b,c),d)

or

   a := (b+c)*d

?

I put in “:=“ because I think overloading = might not work, since it already has a defined meaning for all object types.

And the “before” syntax might be a lot clunkier than that, what if it is

   a.set(times.apply(plus.apply(b,c),d) ?

David

On 2014-09-05, at 3:11 PM, Remi Forax <forax at univ-mlv.fr> wrote:

> 
> On 09/05/2014 07:32 PM, Fabrizio Parini wrote:
>> Hi,
>> 
>> I would like to ask if there are good chances that Java will support operator overloading for value types when they become available.
>> 
>> Regards,
>> Fabrizio
> 
> which kind and why ?
> 
> Rémi
> 




More information about the valhalla-dev mailing list