True Properties Poll
Steven Schveighoffer
schveiguy at yahoo.com
Fri Jul 31 12:49:55 PDT 2009
On Fri, 31 Jul 2009 15:41:34 -0400, Jesse Phillips
<jessekphillips+d at gmail.com> wrote:
> Steven Schveighoffer Wrote:
>
>> On Fri, 31 Jul 2009 15:11:41 -0400, Jesse Phillips
>> <jessekphillips+d at gmail.com> wrote:
>>
>> > It seem no one is confident in their poll writing skills, so I'll take
>> > stab at it.
>> >
>> > This poll is related to D not providing "true" properties. Details and
>> > discussion can be found in DIP4:
>> > http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP4
>> >
>> > Below you will find a list of options. Please place a maximum of three
>> > votes starting with what you would prefer and then your alternatives.
>> > Reasoning can come after your vote.
>> >
>> > 1. Provide a special syntax/keyword to specify properties.
>> > 2. Keep things as they are.
>> > 3. Keep things as they are, resolving the += ... without involving
>> > new property syntax.
>> > 4. Remove current "property" syntax.
>> > 5. Prevent . on rvalues
>> >
>>
>> 1 depending on what the proposed "special syntax/keyword" is.
>
> We can work out the needed syntax after we decide that is what will
> happen.
The syntax is an important part. For example, you cited that as the main
reason why you wouldn't want property syntax:
> I find writing
> property int foo { get; set;}
> More work than
> public int foo;
And I assume you meant public int foo() and public int foo(int value),
since public int foo is a field.
But what about changing:
public int foo();
public int foo(int value);
to
property:
public int foo();
public int foo(int value);
???
-STeve
More information about the Digitalmars-d
mailing list