Boost logo

Boost :

Subject: Re: [boost] Warning policy? local variable hides (i.e. shadows) global variable
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2015-01-18 13:45:19


On Sun, Jan 18, 2015 at 9:21 PM, Olaf van der Spek <ml_at_[hidden]> wrote:
> On Sun, Jan 18, 2015 at 7:10 PM, Andrey Semashev
> <andrey.semashev_at_[hidden]> wrote:
>>> Sure, but using a prefix or suffix for member variables is a common
>>> practice. Do you not do it?
>>
>> Yes, although not universally. There are cases when no prefixes are needed.
>
> Sure, but why should that stop us from trying to improve the cases
> where it is needed?

That's not what you suggested, at least not in that warnings part. As
for the @@ syntax or whatever else, I really don't see the necessity
in it - prefixes work quite well and don't complicate the language. If
you really want to be explicit then this-> is a suitable alternative
(and no, I don't think it's ugly - it's just a normal pointer
dereference that you use everywhere).


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