This post originated from an RSS feed registered with Java Buzz
by dion.
Original Post: a->properties are special in Java 7
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
I am not sure how I feel about a->foo = b->foo, having a magic -> operator for properties.
In theory I actually like syntactic sugar. It can be a pain to learn, but once you do you have more power in your own hands. On the other hand I really hate having > as part of an operator (which bugged me about generics). The peeve? Working with HTML (blog posts, html docs, etc) make it a royal pain. How many entries have you seen that make no sense and then you realise the the generic stuff wasn't escaped. Grr.
I also prefer to think of sending messages to objects. If the message happens to correspond to a property, that is great. a.foo in Ruby could mean many things hidden behind various implementations, and there is no need to call out THIS IS A PROPERTY.
And then of course we like being able to method_missing and more, so a.foo may not even exist yet.