[pmwiki-users] Re: Unifying variables, attributes, properties, part 1

Patrick R. Michaud pmichaud at pobox.com
Thu Dec 15 08:59:14 CST 2005


On Thu, Dec 15, 2005 at 09:25:15AM -0500, Waylan Limberg wrote:
> So your proposing altering PHP's syntax? No way!!!! Sure, in the wiki
> markup, that is fine, but wiki markup is not PHP code. I expect PHP
> code to look like PHP code. Yes, I realized that {$Group} is technecly
> being passed as a string (so one could say your not altering syntax),
> but its treated as a variable and IMO should look like one. Wiki
> markup is wiki marki and PHP code is PHP code. Its not to hard to keep
> the two seperate in my mind.

It should be pointed out that {$var} is also valid PHP variable
substitution syntax.  :-)

My motivation is simply to get things that act the same to look
the same and things that act different to look different.  Thus, if
one uses {$Group} in wiki markup to get a page's group, then likewise
we use {$Group} in a format string setting in PHP.  It also makes 
it obvious that global variables aren't directly available in markup.  

Ultimately, this would mean that we have only two types of variables
(instead of the current three):  "page variables" which are
surrounded with curlies and can be used in either wikimarkup or
Fmt strings, and "script variables" which don't use curlies and
are available only in PHP scripts.

Pm




More information about the pmwiki-users mailing list