From: Johan Torp (johan.torp_at_[hidden])
Date: 2007-05-24 09:55:21
> For Javabeans you can look at http://java.sun.com/products/javabeans/ .
> For dotnet components you can look at MSDN online at
> http://msdn2.microsoft.com/en-us/library/default.aspx and search for
Cheers, I will look into these later on.
> Properties in Java and dotnet are not exposed member variables. Rather
> they are member functions which get and/or set values. The advantage of
> a property is that one can use member data access notation, ie. avalue =
> someObject.someMember for getters and someObject.someMember = avalue for
> setters, and one is internally calling a member function to get or set
> some value. The value itself does not even have to be a data member but
> can be retreived or assigned on the fly. For many C++ programmers
> properties are merely syntactic sugar for calling a getSomeValue and/or
> setSomeValue member function, which in essence it is, but it regularizes
> the syntax in a consistent way.
You're absolutely right.
I will definitely read up on properties as they are a similar construct, thanks
for the input.
What I want to achieve is different though. I am not interested in adding
syntactic sugar. I also think properties doesn't communicate clearly what they
do. A name like observable_value<bool> is much clearer.
Best Regards, Johan
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk