The Artima Developer Community
Sponsored Link

Java Buzz Forum
I'm lonely, buy me lunch

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
Norman Richards

Posts: 396
Nickname: orb
Registered: Jun, 2003

Norman Richards is co-author of XDoclet in Action
I'm lonely, buy me lunch Posted: Oct 23, 2003 12:45 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Norman Richards.
Original Post: I'm lonely, buy me lunch
Feed Title: Orb [norman richards]
Feed URL: http://members.capmac.org/~orb/blog.cgi/tech/java?flav=rss
Feed Description: Monkey number 312,978,199
Latest Java Buzz Posts
Latest Java Buzz Posts by Norman Richards
Latest Posts From Orb [norman richards]

Advertisement

Someone asked about marker interfaces in a thread at javaranch today. I was amused by Stan James' analogy explaining the difference between interfaces with methods, and marker interfaces with no declared messages.

It's just there so someone can ask if it's there. It's a way of declaring you want to be treated in a special way at some point, but doesn't declare that you have any particular methods that can be called.

If I say "I can fly a helicopter!" somebody might ask me to do it, so I have to implement the methods.

If I say "I'm lonely" nobody will expect me to do anything special, but they might buy me lunch.

I thought that was an interesting way to explain marker interfaces. Of course, the need for marker interfaces will be eliminated (or at least significantly reduced) with JSR 175. You won't need to implement loneliness, you can simply declare yourself @Lonely.

Read: I'm lonely, buy me lunch

Topic: Trade Rag Readin': Business Intellegence, Simple View Previous Topic   Next Topic Topic: RFID Information Wars:

Sponsored Links



Google
  Web Artima.com   

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