[pmwiki-users] Proposed change to pmwiki.php: Markup_e
Patrick R. Michaud
pmichaud at pobox.com
Fri Feb 7 07:52:19 CST 2014
If it's something that someone will have to write often, it should
have a short name. (This is why "SDV" has a short name. :)
Otherwise, a longer or more descriptive name should be used.
For this case, if the choice is between 'return' and 'r' I would
tend to prefer 'return', but I'd probably need to look at a few
code examples.
Also, this is a computer and the function isn't called frequently,
so why not accept both 'return' and 'r' as valid options? :-)
Pm
On Fri, Feb 07, 2014 at 08:46:21AM -0500, michael paulukonis wrote:
> What is the reason for using abbreviations and supershort pieces instead of
> the full semantic name?
>
> Staring at "SDV" for the first time (or the first time in a long time) it's
> rather opaque.
>
> As John said, 'return' is a lot more semantic than 'r'
>
> -Michael Paulukonis
> http://www.xradiograph.com
> <http://goog_2112721603>Interference Patterns (a
> blog)<http://www.xradiograph.com%5Cinterference>
> @XraysMonaLisa <https://twitter.com/XraysMonaLisa>
> http://michaelpaulukonis.com
> <http://www.BestAndroidResources.com>
>
> Sent from somewhere in the Cloud
> (hearthrug, by the fender)
>
>
> On Thu, Feb 6, 2014 at 9:28 PM, John Rankin <john.rankin at affinity.co.nz>wrote:
>
> >
> > > I think we can add this. Why the key is named markup_c? This template can
> > > be
> > > used on many places which call PCCF(), is there a better key name?
> >
> > 'return' would be a clearer (and shorter) key name
> >
> > If a very short key name is acceptable, how about 'r'? Then we could write
> >
> > Markup_e( ... , 'r');
> >
> > Thanks!
> > >
> > > John Rankin writes:
> > >> I'd like to suggest a small change to the pmwiki core:
> > >>
> > >> $CallbackFnTemplates = array(
> > >> ...,
> > >> 'markup_c' => 'return %s;',
> > >> ...,
> > >> );
> > >>
> > >> ...
> > >>
> > >> function Markup_e($id, $when, $pat, $rep, $tmpl='markup_e') {
> > >> if (!is_callable($rep)) $rep = PCCF($rep, $tmpl);
> > >> Markup($id, $when, $pat, $rep);
> > >> }
> > >>
> > >>
> >
> > --
> > John Rankin
> >
> >
> > _______________________________________________
> > pmwiki-users mailing list
> > pmwiki-users at pmichaud.com
> > http://www.pmichaud.com/mailman/listinfo/pmwiki-users
> >
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
More information about the pmwiki-users
mailing list