Re: New package: discount

From: Date: Sat, 08 Jan 2011 12:20:19 +0000
Subject: Re: New package: discount
References: 1 2 3 4  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-7924@lists.php.net to get a copy of this message
On Sat, 08 Jan 2011 10:39:28 -0000, Pierre Joye <pierre.php@gmail.com> wrote:
On Sat, Jan 8, 2011 at 9:20 AM, Gustavo Lopes <glopes@nebm.ist.utl.pt> wrote:
In any case, the current markdown package is still based on discount. Modesty aside, mine is fairly superior:
Thanks to make me smile :)
* The current markdown package relies on ZEND_ACC_ALLOW_STATIC, which is deprecated (BC only, as the comment on zend_compile.h puts it) and raises an E_STRICT.
Irrelevant, one liner.
Not really possible without breaking BC. Methods are not supposed to be simultaneously static and non-static; if you remove the flag, static calls won't work, if you add ZEND_ACC_STATIC, instance calls won't work. So, bad design here. ZEND_ACC_ALLOW_STATIC has been deprecated at least since 2004.
* It has a constructor that takes a required flags parameter, which despite being required may or may not be used, depending on how you call the instance functions.
Nothing bad here.
You don't think it's bad design requiring a potentially irrelevant argument?
* It exposes only the most basic discount interfaces (no url or attributes callback, no mkd_line, and no interface for mkd_css and mkd_toc if I recall).
Those were not available by the time I wrote the binding.
Fair enough, though the TODO file mentions the callbacks.
* Misses some discount flags
Same.
* It hasn't been updated for two years.
It works very well in 3 projects and the underlying library did not get significant update in Q1/2010 to justify updates, nothing bad her.
You're missing a lot of quarters here.
* Uses malloc, bypassing the zend engine memory manager, which requires strings returned by discount to be copied for use with PHP.
Happens in all libraries we use, nothing too bad neither. [...]
By the way, did I mention the existence of documentation? http://nebm.ist.utl.pt/~glopes/misc/discount_docs/Discount/MarkdownDocument.html Don't get me wrong, if you're willing to maintain the extension, great; but I would gladly be willing to alleviate you of that burden :p -- Gustavo Lopes

« previous php.pecl.dev (#7924) next »