The Artima Developer Community
Sponsored Link

Java Buzz Forum
a->properties are special in Java 7

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
dion

Posts: 5028
Nickname: dion
Registered: Feb, 2003

Dion Almaer is the Editor-in-Chief for TheServerSide.com, and is an enterprise Java evangelist
a->properties are special in Java 7 Posted: Dec 28, 2006 11:54 AM
Reply to this message Reply

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
Latest Java Buzz Posts
Latest Java Buzz Posts by dion
Latest Posts From techno.blog(Dion)

Advertisement

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.

Read: a->properties are special in Java 7

Topic: Time's Person of the Year: You Previous Topic   Next Topic Topic: Tom Copeland has released PMD 3.9, an open source tool for automatically checking Java code for...

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use