Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85326 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16597 invoked from network); 20 Mar 2015 20:33:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Mar 2015 20:33:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=bowersbros@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=bowersbros@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.181 as permitted sender) X-PHP-List-Original-Sender: bowersbros@gmail.com X-Host-Fingerprint: 209.85.212.181 mail-wi0-f181.google.com Received: from [209.85.212.181] ([209.85.212.181:38313] helo=mail-wi0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 88/88-64120-1248C055 for ; Fri, 20 Mar 2015 15:33:38 -0500 Received: by wibgn9 with SMTP id gn9so1560031wib.1 for ; Fri, 20 Mar 2015 13:33:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=2EJIy0y19IagGH5TLbXwwjWm/z+1h9zRYla0Rtc1gYs=; b=WvgdNS3q3DUsIZAMFuL9st+KXcnZHBeIfScXHyocLqfpoLpuc8pnNpYfEgMXV7Bzxy HAKo31SW2ISHPtKFe0LGHELr2+MNHWHTQw+InYr5Lylmf+8ziXkl7oPxXEmyku45fZ/N cu7Q/Po9jq2E++gfOudUOxxzoxi1NGF+r+ptcaLtDZehcC46dzxNbzmIBs9LwLSl+v7t /EgFhgBy0PF6XTojRO99miG10pZK4jPR+J3I4KMAmLrGv2sY0cJlWyGtYOonK8rCUtGi M3sd9LJLA5ikX4uXAb3u88an4rRopSpNHhvgCcKRk6c+VT4Wol4//5sPrE9XLUvypOOO VydA== MIME-Version: 1.0 X-Received: by 10.194.221.100 with SMTP id qd4mr160678523wjc.113.1426883615045; Fri, 20 Mar 2015 13:33:35 -0700 (PDT) Received: by 10.28.62.84 with HTTP; Fri, 20 Mar 2015 13:33:34 -0700 (PDT) In-Reply-To: <68EA4C07-3543-4133-9795-9AAC5F87D01F@zort.net> References: <550B5A81.1090706@gmail.com> <550B7189.4040608@gmail.com> <7486C296-7535-4633-AFE2-02E7BBC67BC5@gmail.com> <550C1176.9050307@gmail.com> <550C1AE4.8090607@gmail.com> <550C1EC3.8000106@gmail.com> <550C317E.8020508@gmail.com> <550C6422.6080009@gmail.com> <080AC5EA-978C-44F8-81EE-789A2CBEE15A@seancoates.com> <68EA4C07-3543-4133-9795-9AAC5F87D01F@zort.net> Date: Fri, 20 Mar 2015 20:33:34 +0000 Message-ID: To: John Bafford Cc: Sean Coates , Rowan Collins , Leigh , PHP Internals Content-Type: multipart/alternative; boundary=001a11c3aa7402c2dc0511be3bd7 Subject: Re: [PHP-DEV] RFC - Array slice syntactic sugar From: bowersbros@gmail.com (Alex Bowers) --001a11c3aa7402c2dc0511be3bd7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > > There=E2=80=99s no existing unary form of * and ^, though, so I think th= ey=E2=80=99d both > be available in this context (^ is my preference). I think that is also my preference too. On 20 March 2015 at 20:17, John Bafford wrote: > > On Mar 20, 2015, at 16:10, Sean Coates wrote: > > >> I posted four suggestions earlier, > >> > >> They were: > >> > >> @ > >> & > >> * > >> ^ > >> > >> My favourites are the asterisk or caret. > > > > That=E2=80=99s no different than `@` being invalid because it=E2=80=99s= already in use. > > > > $ php -a > > Interactive shell > > > > php > define('a', 1); > > php > define('b', 2); > > php > echo @a . "\n"; > > 1 > > php > echo (a&b) . "\n"; > > 0 > > php > echo (a*b) . "\n"; > > 2 > > php > echo (a^b) . "\n"; > > 3 > > php > > > > > However: `=E2=98=83` has a long history of being available to PHP. > > > > S > > > > There=E2=80=99s no existing unary form of * and ^, though, so I think th= ey=E2=80=99d both > be available in this context (^ is my preference). > > Overloading unary & would probably also work in this context, but > personally, I think that & is too overused. > > -John --001a11c3aa7402c2dc0511be3bd7--