Skip to main content

Blog Archive for cayhorstmann during December 2011

I am finishing the code samples for my book “Scala for the Impatient”. (Yes, for those of you who are impatiently awaiting it—the end is near. Very near.) In the XML chapter, I started an example with val doc = XML.load("http://horstmann.com/index.html")doc \ "body" \ "_" \ "li" It took several minutes for...
Java has no operator overloading. I always thought that was a shame. For example, BigDecimal would be a lot more popular if you could write a * b instead of a.multiply(b). Why doesn't Java have operator overloading? Well,  C++ has it, and people kept saying that it makes code hard to read. Actually, in C++, you can have a library class vector and write v[i], thanks to operator...