Introducing $ – the Java Static Constructor

So this one will probably be controversial.

I’ve been playing around with this idea for a while, really since I started using Ruby in a hobby capacity. ¬†When instantiating a variable in Ruby, let’s say a simple 2D point class, you would use the following syntax:

Whereas we all know that the equivalent Java instantiation would be

There’s something I like about that static style constructor in Ruby, especially when constructing a method argument.

Continue reading “Introducing $ – the Java Static Constructor”