To clarify: You're suggesting we represent java.lang.Double, java.lang.Integer, etc. simply as JavaScript Numbers, instead of representing them as JavaScript Objects like how we do for most other Java java.lang.Objects?
That sounds plausibly okay to me; like you say, we do that for java.lang.String already. Just making sure you're not suggesting getting rid of the Java language autoboxing functionality; i.e., you don't want to make "Object x = 3.0;" into a compiler error. That's definitely a no-go in my opinion, since it'll break Java language compatibility. On Thu, Aug 1, 2013 at 6:01 PM, Goktug Gokdogan <[email protected]> wrote: > I was thinking about autoboxing of numbers when assigned to Object and I > started to question if we really need them in Java to JS translation - at > least for a subset (i.e. Integer and Double). > > Object has only a few methods that we can put into Number.prototype (like > we do for String) and all methods to Integer/Double can be converted to > static calls then theoretically we can drop most of the java autoboxing > code. We can also find similar solutions to calls over java.lang.Number. > > Perhaps, I'm missing some corner cases but I really feel like we can find > a way to get rid of them at least for the most scenarios. Am I being too > naive on this? > > -- > http://groups.google.com/group/Google-Web-Toolkit-Contributors > --- > 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]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- 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]. For more options, visit https://groups.google.com/groups/opt_out.
