Re: C++ property support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christian Parpart schrieb:

and the microsoft proposal (derived from C#)

class my_bar {
public: property int bar {
int get() { return value; }
void set(int v) { value = v; }
}
private:
int value;
}


http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1600.html



first of all, I think comp.lang.c++.moderated is a better place to discuss things like that.

then, I don't think the next version of C++ will have properties as a language feature.
see n1615 for a few arguments by comitee members.
I don't agree with all of them but the most important is: without reflection, properties are only a syntax change of something you can achieve without properties as well.


this paper also proposes a library solution without core language extension you might be interested in - although it has drawbacks like implementation pointer overhead.

Regards,

--
Stefan Strasser

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux