On Friday 22 April 2005 16:43, Justin Morgan wrote:
> Erik Hatcher writes:
> >>  Hungarian notation does have its uses.
> >   Bah!  Not in Java it doesn't.
> 
> I write:
> Agreed.  One of the great things about Java is that it eliminates the
> need for Hungarian notation.
> 
> Even in plain old Java, though, we still have Hungarian notation.  "Get
> and set" anyone?  How often do you write code like this:
> 
> String getFoo() {
>       return foo;
> }
> 
> Does it ever annoy you?  Now, you're going to say "yes but that makes it
> easier in the future if you make it multithreaded or add validation."  I
> argue the language could have handled this more gracefully.  Take a look
> at C#'s object properties for a marginal improvement over this pattern.
> 
> Sorry to get off-topic.

Sorry but:
   private string topic;
   public string Foo
   {
      get 
      { 
         return foo; 
      }
      set 
      { 
        foo = value; 
      }
   }

does not seem to be more comfortable. Ok you have no need for "get" or "set" in 
the method-name
but else...

Cheers,
        Markus

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to