www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: True Properties Poll

reply Jesse Phillips <jessekphillips+d gmail.com> writes:
Steven Schveighoffer Wrote:

 On Fri, 31 Jul 2009 15:11:41 -0400, Jesse Phillips  
 <jessekphillips+d 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.
Jul 31 2009
next sibling parent "Steven Schveighoffer" <schveiguy yahoo.com> writes:
On Fri, 31 Jul 2009 15:41:34 -0400, Jesse Phillips  
<jessekphillips+d gmail.com> wrote:

 Steven Schveighoffer Wrote:

 On Fri, 31 Jul 2009 15:11:41 -0400, Jesse Phillips
 <jessekphillips+d 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
Jul 31 2009
prev sibling parent Jesse Phillips <jessekphillips gmail.com> writes:
On Fri, 31 Jul 2009 15:49:55 -0400, Steven Schveighoffer wrote:

 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.

You assume incorrectly. Some other post covered that.
 
 But what about changing:
 
 public int foo();
 public int foo(int value);
 
 to
 
 property:
    public int foo();
    public int foo(int value);
 
 ???
 
 -STeve

What I want is for += ... to be resolved, if it has to be done with "properties" then fine, hence how I voted.
Jul 31 2009