|
Boost : |
Subject: Re: [boost] [property] interest in C# like properties for C++?
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2009-10-22 13:12:04
David Brownstein wrote:
Please don't top post.
> The only real difference that I see between assignment-style and
> function-style accessors is that if you use function-style
> accessors and
> later you replace an automatically generated accessor with a
> customized
> (manually generated) accessor, then all of the code that uses
> the original
> accessor continues to work (with a recompile).
I understood the point of properties to be that they could, at your discretion, be backed by a mutator and/or accessor function. Thus, when you want a "manually generated" accessor, you create it and inform the property declaration to use it instead of generating code for the accessor.
> The function foo() doesn't need to be changed. This is more
> difficult to do
> with assignment-style accessors.
In my theoretical world, at least, the use of assignment-style accessors has nothing to do with that. After all, we're talking about proxies that forward to functions that do the accessing or mutation, right? The only issue is whether the functions are generated by the framework or provided by the client (class).
_____
Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP http://www.sig.com
IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk