Re: Call for Votes: JSON location
| From: | Greg Beaver | Date: | Sat, 08 Apr 2006 03:14:44 +0000 |
| Subject: | Re: Call for Votes: JSON location | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-42154@lists.php.net to get a copy of this message | ||
Pierre wrote:
> On 4/8/06, Daniel Convissor <danielc@analysisandsolutions.com> wrote:
>
>>Hi Pierre!
>>
>>On Fri, Apr 07, 2006 at 11:57:43PM +0200, Pierre wrote:
>>
>>>What's about a one to one mapping to pecl/json?
>>
>>I can interpret this to mean a few different things. Can you explain
>>exactly what you're thinking, please?
>
>
> In short:
>
> if (!extension_loaded('json')) include 'JSON.php';
>
> --Pierre
From an extensibility standpoint, this seems to me a bad idea.
If the json extension were to change the way the code works or introduce
a bug (heaven forbid), there would be no easy way to fall back to
JSON.php if the json extension were loaded, as they would directly
conflict. Of course, one could go through JSON.php and rename
everything - and do the same in all of the code that uses it, but this
gets tedious fast.
Greg