JDK 8 and properties

Loic Descotte loic.descotte at gmail.com
Wed Oct 5 09:45:29 PDT 2011


Yes lombok-like features would be great
It's a shame to be forced to use an external tool to do this :(

On Wed, Oct 5, 2011 at 6:29 PM, Rich Midwinter <rich.midwinter at gmail.com>wrote:

> You wouldn't need dot notation just to have generated getters/setters
> though. http://projectlombok.org/features/GetterSetter.html
>
> Personally, I have no need for dot notation but do use lombok's @Data
> frequently (even as a mostly server side guy). I'd have a slight preference
> for having a similar solution ship with Java.
>
> Rich.
>
>
> On 5 October 2011 17:11, Paul Benedict <pbenedict at apache.org> wrote:
>
>> Here's my opinion... Properties brings its own issues. Part of Java's
>> success is the readability of the language. If the dot notation is
>> used for properties, readability diminishes because it is no longer
>> apparent whether field access or method access is occuring.
>>
>> someObject.x = 1; // method call or field access?
>>
>> If another syntax is used, then I think it almost defeats the purpose
>> of the proposal in the first place; it also begs the question how is
>> that any "better" than simply calling the getter/setter directly.
>>
>> Paul
>>
>>
>> On Wed, Oct 5, 2011 at 11:05 AM, Loic Descotte <loic.descotte at gmail.com>
>> wrote:
>> > About Alex Miller answer,
>> >
>> > The consensus was not there at the beggining for lambdas, but it worked
>> > (even if it was hard, I admit)
>> >
>> > For the second point, I work on server side but properties are important
>> to
>> > me :)
>> > And a lot of people I know feel the same.
>> >
>> > On Wed, Oct 5, 2011 at 5:26 PM, Mark Thornton <mthornton at optrak.com>
>> wrote:
>> >
>> >> On 05/10/11 16:15, Loic Descotte wrote:
>> >> > Hi all,
>> >> >
>> >> > I was wondering if coin 2 (in JDK 8) would possibly include a
>> >> "properties"
>> >> > feature, to avoid writing getters and setters for all fields in our
>> >> classes.
>> >> >
>> >> >
>> >> The second answer (from Alex Miller) probably still applies
>> >>
>> >>
>> >>
>> http://stackoverflow.com/questions/710266/why-will-there-be-no-native-properties-in-java-7
>> >>
>> >> Mark Thornton
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>> > --
>> > Loïc Descotte
>> > 4 rue Joseph Fourier
>> > 38000 Grenoble
>> >
>> > 06 23 23 36 80
>> >
>> >
>>
>>
>


-- 
Loïc Descotte
4 rue Joseph Fourier
38000 Grenoble

06 23 23 36 80



More information about the coin-dev mailing list