Boost logo

Boost :

Subject: Re: [boost] [property] interest in C# like properties for C++?
From: Stefan Strasser (strasser_at_[hidden])
Date: 2009-10-21 01:06:17

Am Wednesday 21 October 2009 06:02:23 schrieb Edward Diener:
> >
> > x.count(5);
> > int I = x.count();
> I do not believe this is the right syntax for accessing properties. The
> idea of a "property" is that one uses syntax to access it as if it were
> a data object, while it still has the backing of a function to provide
> constraints.

why? there is no widely used practice to use public data objects.
so why would you need a property to emulate that syntax?

while you might not consider accessor functions a property in the language
construct sense, they do represent a property of the object they're a part
of. this is widely used in the C++ standard library and boost.
what's the rationale for another properties syntax?

Boost list run by bdawes at, gregod at, cpdaniel at, john at