language verbosity

In Java, you write Person person = new Person("alex").

In Ruby, you write person = Person.new('alex')

In Java, variables are statically typed, so whenever you declare one, you have to prefix it with its type (Person in this case). Now this does not seem like much of an effort, but it has become a real annoyance to me, now that I’ve writen 80,000 variable declarations or so. Now that there is Eclipse, I don’t have to write down the type anymore, I can just say person = new Person("alex"). Then I position the cursor over person, press <ctrl>+<1>, and select create local variable. Wow, what a relief.

Not having to write it at all is so much nicer.

Tags:

Leave a Reply