On Fri, Sep 17, 2010 at 8:27 PM, Reinier Zwitserloot <[email protected]>wrote:

> Well, all I can say is: Check out Project Lombok :)
>

I think Lombok is a non-starter for a lot of organizations just because it's
basically its own compiler.


> Even properties is a vague term.


Maybe, so let's be concrete: properties like C#.

The short version: uniform access principle.

The longer version:

I want to be able to write "a.name = foo" and not have to worry about
implementing a getter and a setter until the day where I actually need one.
When I do, I just implement it and all clients automatically get redirected
through that getter/setter.

The syntax should also be as simple as possible (in C#, it's just { get;
set; }, in Scala it's even simpler).


> 3. Simple syntax, or even completely automated, generation of
> addPropertyListener or addFooChangeListener and associated methods
> including firing these listeners when the setter is called.
>

I would place this one out of scope. I actually have an upcoming blog post
on how I implemented what I think is an innovative databinding mechanism
that comes close to emulating notification properties but without the heavy
machinery required by PropertyChangeSupport and PropertyChangeListener.


> 4. Library or language feature to let you bind any two properties
> together (one changes when the other changes, and if you want, vice
> versa too).
>

That would be nice but probably out of scope as well. I think it's safer to
put this coupling in a middle entity rather than coupling properties
together anyway (n+m versus n*m).

-- 
Cédric

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