POV-Ray : Newsgroups : povray.off-topic : Hungarian notation : Re: Hungarian notation Server Time
4 Sep 2024 01:18:29 EDT (-0400)
  Re: Hungarian notation  
From: Warp
Date: 5 Jun 2010 04:25:04
Message: <4c0a09da@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> I think the same goes for putting "m" or "g" or whatever in for member or 
> global variables, etc.

  Why? When I started using those, my own code became much easier to
understand to me months later. When I have code along the lines of:

    void Foo::doSomething()
    {
        mCounter += someValue;
    }

or:

    void Foo::doSomething()
    {
        gCounter += someValue;
    }

as opposed to:

    void Foo::doSomething()
    {
        counter += someValue;
    }

the first two are much clearer than the third one. The third one doesn't
make it clear at all where 'counter' might be defined, while in the first
example it's clear that it's a member variable of the Foo class, and in
the second one it's clear that it's not. In the third one it could be
anything.

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.