Michael Hunger wrote:
> When reading your post the get() set() in the accessor chain caught my eye
> once again.
>
> When doing stuff for squill (squill.dev.java.net) I used the shortes and
> visually least impacting notation for method
> names for creating tuples and accessing their values.
>
> That is "_".
>
> Could we add an optional shorthand notation that adds the following interface
> onto Property
>
> interface ShorthandProperty {
> T _();
> void _(T value);
> }
> which then just delegate to the get/set of Property?
>
> That would change:
> person.name().get().givenName().get()
> to
>
> person.name()._().givenName()._()
>
> Which is (imho) more readable.
Interesting idea! I kinda like it. Of course other languages are spoiled
with custom operators, but for us that seems like an interesting
workaround.
Are there any other characters like that which would be legal Java? Just
to examine the possibilities.
/Rickard
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev