Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61460 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27237 invoked from network); 19 Jul 2012 08:05:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jul 2012 08:05:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=indeyets@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=indeyets@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.170 as permitted sender) X-PHP-List-Original-Sender: indeyets@gmail.com X-Host-Fingerprint: 209.85.217.170 mail-lb0-f170.google.com Received: from [209.85.217.170] ([209.85.217.170:44874] helo=mail-lb0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1C/10-25752-8DFB7005 for ; Thu, 19 Jul 2012 04:05:45 -0400 Received: by lbgc1 with SMTP id c1so3702948lbg.29 for ; Thu, 19 Jul 2012 01:05:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:subject:date:message-id:to:mime-version:x-mailer; bh=9I1J4Dg3ExtHCkSop/Sbtj8GXdbO3SOg1WMd17Uqykc=; b=MMc58xwis37+cReR5bpi2NbNnSiUK/K2KTJiZPMFy4m4/fXXQ2L8h2dePTB39Yxtpv Z/CllbsJj78kGZmi82ZvxSeK7oDEj1ZuRg8W5MlU59aMkbCrHU6xHoUb5CKymHMDPbjx uegcDFbzcILYPxR9qgohYewHhI1TlglBYuRevUpcmlfzqgUXcEoMidjmEHPcd0t++J5k Fh6VjXGdtkx8WL687U6bjhU7fA17AY0xs5iM9oz8Wcyn093PblRLOyd7yOP42zixGo+L JYYKb19wLMVMlDvctX7OTt4G3UXqNPrh5vDkrfSB7BvV6RRPlTdPfnkisR0z7mNxC6dg 0n/Q== Received: by 10.152.104.44 with SMTP id gb12mr986594lab.29.1342685140335; Thu, 19 Jul 2012 01:05:40 -0700 (PDT) Received: from [10.0.1.7] ([93.185.190.227]) by mx.google.com with ESMTPS id fv16sm1352791lab.9.2012.07.19.01.05.38 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 19 Jul 2012 01:05:39 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_76CB9D42-4036-4FA5-AA1E-7F08B78A75A1"; protocol="application/pgp-signature"; micalg=pgp-sha1 Date: Thu, 19 Jul 2012 12:05:35 +0400 Message-ID: <64223D01-8F4C-4B65-AD6C-5C425EC0EA68@gmail.com> To: internals internals Mime-Version: 1.0 (Apple Message framework v1278) X-Mailer: Apple Mail (2.1278) Subject: Regarding PHP6, string/array APIs From: indeyets@gmail.com (Alexey Zakhlestin) --Apple-Mail=_76CB9D42-4036-4FA5-AA1E-7F08B78A75A1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Stas made a good point about need to start with new API, which then can = be followed by syntactic sugar. So, we need some ideas to start with: 1. A lot of people told, that it would be a good idea to come with a = written standard regarding arguments order. I don't care what it will = be, as long as it will be documented. 2. It would be really useful to have 2 versions of each function: one = which mutates the variable and one which returns the new variable. Example: 3. Speaking of implementation=85 Functions, which return slice of = string/array could be made to reference the same memory-areas as the = source strings/arrays. That is until the first modification, of course. = Kinda advanced copy-on-write semantics. I know something like that is = implemented in D http://dlang.org/d-array-article.html and Go 4. casting between strings and arrays of characters would be a great = thing to have too. this way, useful array-oriented functions could be = applied to strings= --Apple-Mail=_76CB9D42-4036-4FA5-AA1E-7F08B78A75A1 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) iQEcBAEBAgAGBQJQB7/QAAoJEM8kLGy4PJ4JJxMIAJSgcfLL8LT9Gz7Uvl0/7Cgz hr9sVgBUgXuw7WQ5cHPH6Umf6sN6MBOkLyWVr9ZGGrYJAGPVcJJBB9KhQ7ZReZFT /bfQLZdQWuJLzUjPXu8VzD9WWYhCBgGxd0fM4f6VZ9uAm7utKR1rO93LHWFHrw8p 6dHheYxnZu5l67ofN9TvFND68yGT4YeyhYJJZORZO/wnjyYWtA8nUUgBke74jciQ NwH92wZl+G6dajdVHQ+Xk9fZf0PxecFAIBkMVGccRjBEvzst/I8gsP9G7s+oXHxQ Eu7c8jPX/5n4AZBh+Y3RAL4jXpRyPNm3VQ+S9oNk4QSRd+w9ATw0fQOUDAVa3fY= =MKpF -----END PGP SIGNATURE----- --Apple-Mail=_76CB9D42-4036-4FA5-AA1E-7F08B78A75A1--