Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65603 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51546 invoked from network); 4 Feb 2013 02:51:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Feb 2013 02:51:58 -0000 Authentication-Results: pb1.pair.com header.from=shadda@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=shadda@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.51 as permitted sender) X-PHP-List-Original-Sender: shadda@gmail.com X-Host-Fingerprint: 209.85.219.51 mail-oa0-f51.google.com Received: from [209.85.219.51] ([209.85.219.51:55566] helo=mail-oa0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 40/41-40350-D422F015 for ; Sun, 03 Feb 2013 21:51:57 -0500 Received: by mail-oa0-f51.google.com with SMTP id h2so3965553oag.38 for ; Sun, 03 Feb 2013 18:51:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:content-type:content-transfer-encoding:subject:date :message-id:to:mime-version:x-mailer; bh=L+Yun+IbzKjIfoKkYrDxwedg4kl+tX0hu/qboPjn1Yw=; b=OwyVYhBDtYl5mb1yqL07CTE6TVv3Bso0B7CM2dvFk/35G5BtjqSX9HaPtNp66tdMqg HWnPmRZFo1ZYldxHStz5GK2MHqtbTVDPsE59Zxf73Z5aE3ep5CBra1SJD03z/TTdfQDI WKnrWCpLKzIxJpkxHUiM6e1TBH0PMdJAgXfNDp1j1odyjewpR6myu1XYVHoiBtTAIrbC dySf0+ltAkdniUF/A7Q8acxU94IoJ9GDrIbUkLJkt/GYWxFjO69lb6EqxkMMMwSV4mUH lvUmo1v2q1ihjVy7hE/40D4zqebQDWrQmgovYlbogLfQAjAD1U66TlkrzwteeGh+vMuU AHtg== X-Received: by 10.182.226.103 with SMTP id rr7mr14080541obc.76.1359946314563; Sun, 03 Feb 2013 18:51:54 -0800 (PST) Received: from [192.168.0.100] (108-64-76-109.lightspeed.sntcca.sbcglobal.net. [108.64.76.109]) by mx.google.com with ESMTPS id c4sm19829907oee.0.2013.02.03.18.51.53 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 03 Feb 2013 18:51:54 -0800 (PST) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Sun, 3 Feb 2013 18:51:51 -0800 Message-ID: <5FC22A05-FE01-4222-892C-773ECC39E471@gmail.com> To: PHP internals Mime-Version: 1.0 (Apple Message framework v1283) X-Mailer: Apple Mail (2.1283) Subject: Questioning the future of PHP From: shadda@gmail.com (Matt Wilson) Hello all. I'd like to start by saying that I am by no means an expert = on the subject at hand, and my knowledge is limited to pretty much basic = C/C++. I have done little more than patch and write ad hoc extensions = for PHP in the past. I'm not looking to criticize so much, as I'm just = interested in an honest discussion, for my own sake and understanding. Many years ago I was on this internals list lamenting that PHP lacked = namespaces. I was passionate in my conviction that it couldn't be a true = language if it lacked them. But it wasn't until they were finally being = considered that I realized the one weakness in PHP that prevented a = proper namespace system. The autoload problem. Since PHP lacks an = inherent style of code importation, it is a decision largely left up to = the developer. This of course causes an order of precedence problem. Now, I won't lie, some of my beef with namespaces as they stand is the = \. What can I say, I like a certain feng shui in my code. I understand = the technical limitations (or at least think I do) and the problem of = ambiguity with other operators, however I feel more effort might have = been made.=20 If I were to pull some examples out of my ass, and feel free to rebuke = me if I'm missing something obvious, [namespace foo.bar] new [foo.bar.SomeClass]() Would that be so hard to distinguish in the parser? If it is, I'd be = grateful to know why. Touching back on what I mentioned earlier about PHP not having an = inherent way to load files, and in daily use it's somewhat arbitrary. I = share the philosophy that the programmer should tell the code what to = do, and not the other way around; however, I think some enforced = structure can be good. This is something of a wet dream of mine and one = I highly doubt will come true, but to get rid of __autoload (or at least = supplant it with a default loader) would be a dream. I think it's = something that PHP needs, to complete some one of advances its made in = recent years.=20 Thanks, Matt