3 ms·
Java's arrays[] and primitives are part of the underlying implementation poking through with special syntax and behavior, as compared to arrays/lists/numbers in
by lihaoyi 14y ago
Java's arrays[] and primitives are part of the underlying implementation poking through with special syntax and behavior, as compared to arrays/lists/numbers in python/c#/scala which are full fledged objects.
That's basically the crux of it. In python/c#/scala, a for loop looks the same whether you use ints, longs, bigInts or complex numbers as the iterator. In java, you have special, relatively compact syntax for the close-to-the-metal types like ints or longs, but using anything higher level suddenly becomes ridiculously verbose. Writing BigIntegers as for-loop iterators is no fun!