scala folks: why is scala's Iterator defined with hasNext and next? Why not
trait Iterator[T] { def next: Option[T] }
I blame @extempore2
-
-
Replying to @posco
@posco Because you'd have to box every value? /cc@extempore21 reply 0 retweets 0 likes -
Replying to @viktorklang
@viktorklang@extempore2 not if Option were specialized (also, all collections box now). PS: when do we get mini boxing everywhere?3 replies 0 retweets 0 likes
Replying to @posco
@posco @viktorklang @extempore2 Specialization didn't exist when Iterator was created.
12:00 PM - 25 Nov 2014
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.