[pmwiki-users] Proposed change to pmwiki.php: Markup_e
5ko at 5ko.fr
Fri Feb 7 19:36:45 CST 2014
michael paulukonis writes:
> If brevity is needed for performance reasons, can't the source be run through
> a minifier prior to packaging?
Some brevity is needed to me in order to keep my sanity and to be efficient.
That includes writing less code, making less errors and seeing more of the
program logic at once on my screen.
When some helper functions are used tens or hundreds of times, it helps
having short function names - abbreviations of the intended functionnality.
I also feel that it is much easier to remember what the function does,
compared to, for example, the order of its arguments (that's why I like most
functions with a single argument :-).
Also, these are just helper functions: they do some things that are required
to be done, but are not essential to the grand program logic, and I want
them out of my way.
> A program IS NOT communication between a human and the machine.
> It’s a communication between a developer and the next developer.
It is also a communication between a developer and himself/herself.
> The communication I receive from a function names like "PCCFR" or "XLSDV" or
> "PZZ" is "you are not worthy of contributing to this codebase until you
> memorize our secret language [hint: it only _looks_ like PHP]."
I'm willing to better document these functions if the current documentation
There is absolutely no requirement for a developer to use these functions. A
module can contain all necessary code without using any of the above or
other core helper functions.
For example, PHP has more than one way to define callback functions; ours
PCCF() "PmWiki Create Callback Function" is tested and works with PHP 4.2 to
5.5 but you are not required to use it.
Other example: you can escape some HTML entities in different ways; ours
PHSC() "PmWiki HTML Special Chars" is tested and works with PHP 4.2 to 5.5,
even when your text stream contains invalid characters for the default
encoding, which changes in different PHP versions. But you are not required
to use it: if you like, you can write your own functions, debug them and
support them for your users. :-)
> [Petko, maybe you were making a joke by taking something to an extreme.]
> On Fri, Feb 7, 2014 at 12:31 PM, Petko Yotov <<URL:mailto:
> 5ko at 5ko.fr>5ko at 5ko.fr> wrote:
> Instead of PCCF('function code', 'r'), I'd prefer writing simply
> PCCFR('function code').
> (... PmWiki Create Callback Function Return...)
More information about the pmwiki-users