Re: How to set the scale for scala.BigDecimal's / method?
2008-12-01 00:18:10 GMT
Bill Venners <bill <at> ...> writes: > I'm not sure how many APIs take java.lang.Iterable, or therefore how > helpful being able to pass a Scala Iterable around as a > java.lang.Iterable would be. I think this is partly because java.lang.Iterable was only introduced in Java 5. Google Collections use Iterables/Iterators quite a bit, for example (they even have a FAQ about it). [...] > I've never needed to use scala.collection.jcl, but my theory has > always been that this was its intended purpose. It also has implicit > conversions, but is too specific in the "unconvert" direction. Agreed. Miles Sabin had created a nice set of classes that would work for general scala collections too. > If people actually need conversion between Scala and Java Iterator, > and/or Scala and Java Iterable, then methods could be added here that > do it, but as I mentioned I'm not sure how often this would be needed. They are needed as far as I am concerned, but my preference is also for conversions instead of having j.l.Iterable as a superclass. I understand that others disagree with this though and I have seen it used as a reason why Scala provides worse interoperability with Java than Clojure or Groovy. Ismael  http://code.google.com/p/google-collections/wiki/Faq (search for "Why so much emphasis on Iterators and Iterables?").(Continue reading)