Random photo
Loading...
Domains for sale
|
November 8, 2006C# Future Directions: RubyRemember that catchy RubyCLR motto?
Now C# (Anders Hejlsberg) is playing catch up talking about automatic properties: public string Bar { get; set; }Above is meant to be translated by a compiler into private string foo;
public string Bar
{
get { return foo; }
set { foo = value; }
}
Now I'm not sure I like reusage of the abstract property notation, but still way to go guys.
Comments
I believe the idea is to minimize the impact on C# syntax, so reusing existing constructs. I love the idea too but don't like the abstract property notation either. I always thought it would complimentary to the "event" keyword to do this like so: class Foo { The only case this doesn't handle is set only properties which are so uncommon that I wouldn't mind having to implement the property the old way. Posted by: Keith Hill at November 9, 2006 7:57 AMI don't see why they don't just use the trivial property syntax like the one in C++/CLI, which I find just cleaner. Posted by: Tomas Restrepo at November 8, 2006 7:42 PMPost a comment
|