Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87106 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48196 invoked from network); 11 Jul 2015 02:08:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jul 2015 02:08:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=larry@garfieldtech.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=larry@garfieldtech.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain garfieldtech.com from 66.111.4.25 cause and error) X-PHP-List-Original-Sender: larry@garfieldtech.com X-Host-Fingerprint: 66.111.4.25 out1-smtp.messagingengine.com Received: from [66.111.4.25] ([66.111.4.25:49582] helo=out1-smtp.messagingengine.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 59/00-42373-28A70A55 for ; Fri, 10 Jul 2015 22:08:05 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A0EA820359 for ; Fri, 10 Jul 2015 22:07:59 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Fri, 10 Jul 2015 22:07:59 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=mbMHlunzrI3YJxI lQnE8uG0o7LA=; b=uZrLGQj+FNLdLeYdbCJ0ZfjJq/tb3P1uklEaTgVv1QvwMG8 sJvCz1+YWiIS8HtowRXe4Yp2IbJfHtJdTHa8BCVKzhK/NkLtBFjPtLIIMkhChXmb DkPWz4Dd1CpvGsNKurCcQ7PA9QiJvjOeIg7iUsW9pje/HWXV+XlVTHur1q7I= X-Sasl-enc: cx2dBoMFgm1K/VzWhURxcakUGeCpAWQI5wqUs89KyIm7 1436580479 Received: from [192.168.42.5] (c-50-129-175-166.hsd1.il.comcast.net [50.129.175.166]) by mail.messagingengine.com (Postfix) with ESMTPA id 6A87DC00026 for ; Fri, 10 Jul 2015 22:07:59 -0400 (EDT) Message-ID: <55A07A7F.8040409@garfieldtech.com> Date: Fri, 10 Jul 2015 21:07:59 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: internals@lists.php.net References: <87ad99ac-6647-4e40-a9c2-d652a46cfaae@me.com> <55A03B7D.1040907@garfieldtech.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Concept for Json_decode From: larry@garfieldtech.com (Larry Garfield) On 07/10/2015 07:37 PM, Kris Craig wrote: > On Fri, Jul 10, 2015 at 2:39 PM, Larry Garfield > wrote: > >> On 7/10/15 3:27 PM, Dean Eigenmann wrote: >> >>> Hello, >>> >>> I have a proposal for PHP. The proposed interface would allow developers >>> to decode json into a custom object directly. If given the approval I would >>> possibly be able to implement it. >>> >>> Here is my github link with further details: >>> https://github.com/decanus/JSON-Aware/tree/master >>> >>> Regards, >>> Dean >>> >> I'll ask before someone else does... >> >> Why does this need to be in PHP core? Why can't it be done purely in >> user-space PHP code? The syntax would be different, fine, but how is it >> functionally better in C? >> >> -- >> --Larry Garfield >> >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > PHP already has tons of abstractions designed to provide convenience. > We've never followed the "if it can be done in userland, don't do it in > core" standard. If we did, we would have far fewer array_* functions, for > example. > > The question is whether or not this would be useful enough to warrant > putting it in core, not whether or not someone could write a ton of code to > do it in userland. > > Dean, could you write an RFC for this proposal? That would make it easier > to evaluate, plus give us something we can vote on. > > --Kris Except that "this is simple enough to do in PHP, why does it need to be in core" has been the reason to reject plenty of proposals, too. It's an entirely fair question to ask, and one that an RFC will need to address. --Larry Garfield