Boost logo

Boost :

Subject: Re: [boost] [property] interest in C# like properties for C++?
From: Bo Persson (bop_at_[hidden])
Date: 2009-10-23 22:11:33


Olaf van der Spek wrote:
> On Fri, Oct 23, 2009 at 5:33 PM, Edward Diener
> <eldiener_at_[hidden]> wrote:
>> You are not talking about the access syntax of properties, as I
>> define it, so your "Unacceptable"s mean little to me. Of course if
>> the syntax limitations of a property implementation vis-a-vis
>> direct manipulation of a data value is unacceptable to you, then
>> you just wouldn't use it.
>
> Don't you agree that string& name = c.name; name.size() is kinda
> ugly/unusable compared to just c.name->size() (possible) or
> c.name.size() (not possible, but ideal)?

I might be stupid here, but can not see any advantage at all for using
c.name->size() over the traditional c.name().size().

And why is the "ideal" c.cname.size(), should it not be c.name.size
with size being a property of the string?

Bo Persson


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk