Revised RFC on range design for D2
Bruno Medeiros
brunodomedeiros+spam at com.gmail
Fri Oct 3 03:45:49 PDT 2008
Steven Schveighoffer wrote:
> "Bruno Medeiros" wrote
>> Andrei Alexandrescu wrote:
>>> Eiffel also has properties
>>> that are obtained via syntactic conventions (getX and setX implement
>>> property x)
>> Hum, interesting, I just replied in another part of the thread with a
>> suggestion that is just like that (and didn't know about it).
>
> In fact, C++.net did something similar in that if you defined a property x
> in C#, it really defined two hidden functions, get_x() and set_x() that
> could be called from C++.
>
> But the new C++.net is much better, you can actually use and define real
> properties.
>
> I consider this type of thing a hack, that probably shouldn't be used since
> we are talking about a developing language and not something that has
> decades of real-world use. I personally think it was one of those Microsoft
> marketing things where they made C++.net so it could interact with other
> languages, but made it so ugly that you perceived C# as being soo much
> better ;) But that's just the cynic in me.
>
> All that is needed is a keyword to signify that a function is really a
> property, kind of like 'pure', and enforce the rules that have been
> discussed. Since D2 is already getting new keywords and is almost
> backwards-incompatible with existing D1 code, I don't see this as a huge
> issue.
>
Just for the record, I didn't present that suggestion because it didn't
require a new keyword. I think that's a very weak concern, and as I've
said before, I find Walter's current obsession with keyword economy
outdated and silly (example: "enum", among others).
--
Bruno Medeiros - Software Developer, MSc. in CS/E graduate
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
More information about the Digitalmars-d-announce
mailing list