Re: Fwd: Compiler Guided Refactoring.

J Arrizza <[email protected]> Mon, 8 Jul 2013 15:36:53 -0700
Newsgroups gmane.comp.programming.refactoring
Message-ID <CAEyOLyCcYHVe+mGVN8hA97P8zLS5ZC=BsOP4aTyfTK_Q0bK4jw@mail.gmail.com>
Absolutely true (again).

But the idea I'm trying to get across is bigger than a naming convention.
To me, at the most abstract level and very roughly speaking, software
development is the organization and management of side effects. And the
goal of refactoring is to make those side effects crystal clear to the
reader.


On Mon, Jul 8, 2013 at 11:27 AM, Richard <[email protected]> wrote:

> **
>
>
>
> In article <
> CAEyOLyB+NPY-zhMGSG_F7NHJgPYsqsUHjkAYoOD5D4sejYYcSQ@mail.gmail.com>,
> J Arrizza <[email protected]> writes:
>
> > Further to this, one additional refactoring I've used is Rename Variable
> to
> > add a "g" prefix to all global variables. I personally don't like
> hungarian
> > notation but adding the "g" is a very useful exception to this rule. All
> > the globals show up clearly in the code.
>
> Strictly speaking, this isn't Simonyi (i.e. "Hungarian") notation,
> which encodes the type of the variable into it's name:
>
> int i_foo;
>
> You're annotating the name with it's visibility scope. This is often
> done by many people for global ("g_" prefix), static ("s_"), and member
> ("m_") data. In C#, we would often use "_" prefix for class member
> variables. In Java, the cultural convention seems to be to not use
> any prefix for member data at all. In C++, identifiers beginning with
> underscore followed by a capital letter or another underscore are reserved
> by the standard, so the tendency has been to use "g_", "s_" and "m_"
> even if Simonyi notation is not used, avoiding a leading underscore
> altogether.
> --
> "The Direct3D Graphics Pipeline" free book <
> http://tinyurl.com/d3d-pipeline>
> The Computer Graphics Museum <http://computergraphicsmuseum.org>
> The Terminals Wiki <http://terminals.classiccmp.org>
> Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>
>  
>


[Non-text portions of this message have been removed]



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/refactoring/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/refactoring/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/