On 06/09/2011 04:52 PM, Robert Fischer wrote:
I've been using precisely the pattern that Charlie lays out in some of
my code, as well, so I'm going to have to code around it now. I didn't
realize that it was technically ambiguous — it's really surprising to
my intuition, which (I'm now realizing as I think about it) tries to
match arguments left to right, and only drops to varargs if it can't
find a match. That intuition is obviously wrong compared to the spec,
but does that mean we have a bug in the spec? What's the justification
for this behavior?
For the record, both Scala and Groovy resolve methods more in line
with intuition:
Groovy > https://gist.github.com/1016878
Scala > https://gist.github.com/1016880
Yes, because either in Scala or in Groovy int is a subtype of Object.
There is no point to make a difference between int and Integer in a
dynamic language.
~~ Robert.
Rémi
--
You received this message because you are subscribed to the Google Groups "JVM
Languages" group.
To post to this group, send email to jvm-languages@googlegroups.com.
To unsubscribe from this group, send email to
jvm-languages+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/jvm-languages?hl=en.