[Pmwiki-users] Re: Variable names

Patrick R. Michaud pmichaud
Mon Oct 18 09:38:10 CDT 2004


On Mon, Oct 18, 2004 at 11:11:34AM -0400, Robert P. J. Day wrote:
> On Mon, 18 Oct 2004, Patrick R. Michaud wrote:
> 
> > On Mon, Oct 18, 2004 at 09:19:22AM -0500, Jonathan Scott Duff wrote:
> 
> let me put it another way.  if you could magically make that
> substitution happen throughout all of PmWiki2, would you do it?  if
> you answered "yes", then you make it happen and deal with the
> difficulties.  saying it would be a difficult edit just isn't
> persuasive.

Not on its own, but I did give *two* reasons.  In answer to your question
above about making the substitution, my answer would in fact be "no", 
because I think the word "page" (and by extension "$Page") means much
more about a page than just its name.  Indeed, throughout the code
the variable "$page" (lowercase 'p') is used for objects that
are complete pages including history, text, attributes, etc., and not
just the page's name.

> think of it this way.  someone's street address consists of two
> pieces of information:
>   1) street name
>   2) house number
> if you combine those two, you get their address.  as i see it, Group
> should correspond to street, and Page is the house number.

This analogy is perfect.  If I were talking about someone's "address",
my variables names would be $Street and $Number, not $Street and $Address
(which would be confusing because the street is part of the address).
To follow this analogy properly, since we're talking about "pages" the
variable names should be $Group and $Name, and not $Group and $Page.

Pm



More information about the pmwiki-users mailing list