+1 for C# style properties.  I see no downside.  Looks like Delphi
properties from 12 years ago.  When I went to Java I missed them.. I
was surprised how Java was a step backwards in many ways from Delphi.
And we STILL don't have events and properties 12 years later!

On Feb 6, 11:24 am, joncfoo <[email protected]> wrote:
> Regarding properties:
> What is holding them back from implementing properties like they are
> in C# since it could be implemented as syntactic sugar.
>
> Plenty of examples here:http://www.csharp-station.com/Tutorials/Lesson10.aspx
>
> It would be nice to traverse large object graphs w/o having the ugly
> getters.
>
> E.g.
>
> // before
> obj1.getObject2().getObject3().getObject4().setSomeProperty(1234);
>
> // after
> obj1.object2.object3.object4.someProperty = 1234;
>
> It is just syntactic sugar...
>
> Jonathan
>
> On Feb 5, 9:47 pm, Bill Robertson <[email protected]> wrote:
>
> > On Feb 4, 11:58 am, gafter <[email protected]> wrote:
>
> > > Although I believe the syntax is not ideal in its current form, I'm
> > > not going to spend more time on it until Sun formally decides they
> > > want to move forward with it, and that's not going to happen in JDK7.
>
> > I certainly understand that position, but I think its worth
> > considering syntax, even if only in a passive manner (i.e. just think
> > about it).  I've been dealing with C++ recently, and man oh man* I
> > forgot what a pain that was after not having touched it in so long.
> > Generics nudged Java syntax in this direction, and the little bits and
> > bobs of closure syntax that I've seen so far (no specific proposal
> > mind you), have left me with that same feeling.  I hate to try to
> > suggest answers when I don't believe I have good ones, but I also hate
> > to just complain w/o offering suggestions.  So I would like to offer
> > up the suggestion of considering keywords rather than oddball
> > symbols.  e.g. lambda v.s. =>
>
> > Thanks.
>
> > *Not to be confused with, "OhmanOh Man," a lesser known super hero.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to