[Pmwiki-users] Re: Variable names
Pierre Rouzeau
pierre
Mon Oct 18 09:42:48 CDT 2004
May i humbly suggest to call the '$Name' variable '$Yop' .
It doesn't mean anything, but it's short, and as it is bizarre, it will
be easily remembered.
And that will add some fun to the Wiki and to that thread :)
Please don't take the above too much seriously...
Regards
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:
>>
>>
>
>
>
>>>In a system where you have well-defined concepts of pages and groups,
>>>$Group makes sense, but $Name does not. I suggest $Page instead.
>>>
>>>
>
>
>
>>There are several problems with $Page -- the biggest being
>>that, for obvious reasons, there are a *lot* of variables that begin
>>with "Page" ($PageEditFmt, $PageNameChars, $PageNotFound, $PageUrl,
>>$PageAttributes, etc.). Thus, in order for this to work the '$Page'
>>substitution would really need to take place *after* checking for
>>all of the other substitutions, or we do some pattern trickery to make
>>the '$Page' we see isn't part of something larger.
>>
>>
>
>that's an implementation detail of how you'd *affect* the change, and
>has absolutely nothing to do with whether using $Page instead of $Name
>is a better idea. in effect, it's a non-argument. (and the fact that
>all these other variables start with the prefix "Page" is the best
>argument *for* calling it $Page instead of $Name. :-)
>
>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.
>
>
>
>>Beyond that, conceptually I've always felt that the term "page"
>>includes the group it's in -- i.e., people will normally think of
>>Main.WikiSandbox as a different "page" from PmWiki.WikiSandbox, even
>>though they have the same "name".
>>
>>
>
>the law of orthogonality clearly suggests that you have two variables:
>
> Group JUST the group name
> Page JUST the page 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. if you
>need the full address, you add the two together. no problem. (and,
>again, any difficulties in affecting the change are not an issue in
>deciding whether or not this should be done -- only whether it's a
>good idea or not.)
>
>(and as a side note, conceptually, i would have considered $Page as
>just the page name without the Group prefix. i guess we all have
>different philosophies.)
>
>
>
>>Of course, PmWiki 1 uses "$Title" for this, which works okay except
>>that "title" means something different in the context of HTML
>>(<title>...</title>) and doesn't work at all if a page can specify
>>its own [:title:], so I switched to $Name. It's not too late to
>>switch to something else, but it needs to be demonstrably clearer.
>>
>>
>
>i think it already *is* demonstrably a better idea. having a variable
>whose name is $Name is begging for confusion and a lack of clarity.
>
>rday
>
>
>
Page principale - Main page - www.rouzeau.net <http://www.rouzeau.net>
---------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users_pmichaud.com/attachments/20041018/f5341a0b/attachment.htm
More information about the pmwiki-users
mailing list