Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52625 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92438 invoked from network); 1 Jun 2011 05:58:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jun 2011 05:58:44 -0000 Authentication-Results: pb1.pair.com header.from=dukeofgaming@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=dukeofgaming@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.83.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: dukeofgaming@gmail.com X-Host-Fingerprint: 74.125.83.42 mail-gw0-f42.google.com Received: from [74.125.83.42] ([74.125.83.42:38899] helo=mail-gw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 99/63-02790-315D5ED4 for ; Wed, 01 Jun 2011 01:58:43 -0400 Received: by gwb17 with SMTP id 17so2443407gwb.29 for ; Tue, 31 May 2011 22:58:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=Di8Ijdia6Td1xjxUpZoxQWWQWsSbo/cJUyFgnL0goys=; b=UpibqjOjcjOIcDXkVyA4DYm7jJ93wFK7uCGf+1LEaqa26TAMnP2elktIrOZNxE6OkI 69qy7B4q+wf2r2e2UUepLyOgKrsf4mkFXYCHHHCqqBHIZuc4aj2qqkO3ihxF9y7N6/eE ko3l0LOSKbKPNSnAdmOVBtWrTSG3umGs6eEZ0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=uGMOogxgeM5HKoso8imj43yolXR9FxpalZkQ2KsdJmgAxh2zf42TbkNYdnl7qlz5zw RmNypevkApNnr460EOfwtUjkwlckCZqpGLhi2nl3wrKoK7RWKVLMqg25/PynH71tCkyW Z6o0pCtfsRW8NHYpwTvL9uKwumHb8SvWTL13E= Received: by 10.101.166.1 with SMTP id t1mr4392894ano.43.1306907920102; Tue, 31 May 2011 22:58:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.96.15 with HTTP; Tue, 31 May 2011 22:58:20 -0700 (PDT) In-Reply-To: References: <4DE5368A.6050603@moonspot.net> <2BFFEAC1-395E-4101-9452-002E63DCFD91@seancoates.com> <4DE55AB7.9050206@lerdorf.com> <4DE55CDA.302@sugarcrm.com> <4DE5666A.3080506@lerdorf.com> <4DE5CAEA.4030805@sugarcrm.com> Date: Wed, 1 Jun 2011 00:58:20 -0500 Message-ID: To: Michael Shadle Cc: Stas Malyshev , PHP internals Content-Type: multipart/alternative; boundary=005045015be854f73504a4a03639 Subject: Re: [PHP-DEV] RFC: Short syntax for Arrays (redux) From: dukeofgaming@gmail.com (dukeofgaming) --005045015be854f73504a4a03639 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On Wed, Jun 1, 2011 at 12:35 AM, Michael Shadle wrote: > I don't really want to stand on my soapbox any longer, as it's obvious > where the crowd leans on this one, but I need to clarify a couple > points a bit and feel obligated to reply to another. > > On Tue, May 31, 2011 at 10:15 PM, Stas Malyshev > wrote: > > > Fundamental changes means "throw out your production code and start > > developing a new one". Guess how many PHP shops with existing code woul= d > be > > happy to do it. It's nice to rant about how PHP function are inconsiste= nt > > and stuff, but no project was seriously impeded by it ever. At most it = is > > mildly irritating. Huge BC break, on the other hand, would mean all maj= or > > apps/libraries/frameworks become instantly not available, and who knows > when > > they catch up. At this point, you might as well have a new language. > > This is understood, but it was a crackpot example. IMHO, adding more > ways to express the same thing in a well-established language is more > or less the same. It's relearning something you thought you already > knew; yes, one breaks BC, but that is why you'd have to classify it a > different major version. I'm done on that one. Like I said, it's a > crackpot example. > > > Since many experienced people are supporting it, I'd think that while i= t > > seems unnecessary to you, it may seem otherwise for them. > > Many experienced people are also against it. > AFAIK, it was because they didn't want to maintain/implement it. Don't know if this was before the patch was provided. > > If a handful of "experienced people" decided to go forward with my > crackpot idea above, would you be in support, just because they are? > > Also, you're implying that this is a *necessary* change for these > experienced people. Is there something I am missing that PHP is *not* > handling currently and requires this *necessary* change? (No) > > > Read this (esp. first answer): > > http://stackoverflow.com/q/6162484/214196 > > > > It's about Perl, but gives you an impression why it is so tough. > > I figured it was tough, based on the amount of effort/time people > spent. Sad to see that it seems abandoned though. > > > Why not? If the pieces are good, stealing them is good. It's how progre= ss > > happens - you "steal" good pieces and add couple of your own, and hope > the > > result is good enough that somebody else would want to steal stuff from > it > > While a language is maturing, I would probably agree. I consider PHP > quite mature now. I'd say the proof is in the pudding based on the > numbers. > > My chief concerns are these: > > IMHO, JSON-style syntax is *not* as readable as PHP array syntax. It's > shorthanding something that is pretty short as well. > > Currently, if I want to find an array in code, I can search just for > "array" or "Array" or "=3D>" or variations thereof. This adds yet > another type of grep I have to run through. One that I am not sure can > be easily accomplished (wouldn't it be matching quite a lot more > because of it's bare nature? Now we've got to look up neat ways to > combine and grep for :?[]{} etc.) Also, now you have coders on the > same project using their personal preference. > If something isn't broken, why fix it? That was the basis on my > original comment about things that actually were underway or brought > up due to issues. > > Before I get off my sandbox, and go back to the shadows on the dev > list, someone privately replied to me and said this will help because > it will "its hurting lots of people's eyes (and wrists on the long > term)" - I'm taking that as a joke. > Weird, I didn't mean to reply privately, must have mistaken the reply to al= l button. Anyhow, I did say it tongue-in-cheek, but the shorter syntax is easier on the eyes for the nested case. Just FTR I'll copy most of my email here: ---- Stolen?, why not learned?. Java has great architectural stuff and if wasn't for other languages (and developers educated on them) we wouldn't have stuf= f like exceptions, reflection, and =97in the future=97 traits. You write as i= f PHP could not or should not improve, and that is a very wrong attitude to have IMHO. The shorter syntaxes are more readable and thus an improvement. You said: "Is it hurting anyone to type out "array()" or something?" I say its hurting lots of people's eyes (and wrists on the long term, tsk tsk). But its not going to be an obligatory syntax, you will always be able to use "array()" if you enjoy it; personally, I don't, and I don't think th= e proposers and supporters enjoy it that much either. --- Regards, David --005045015be854f73504a4a03639--