Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70342 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5064 invoked from network); 24 Nov 2013 02:02:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Nov 2013 02:02:27 -0000 Authentication-Results: pb1.pair.com header.from=tjerk.meesters@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tjerk.meesters@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.176 as permitted sender) X-PHP-List-Original-Sender: tjerk.meesters@gmail.com X-Host-Fingerprint: 209.85.220.176 mail-vc0-f176.google.com Received: from [209.85.220.176] ([209.85.220.176:45551] helo=mail-vc0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 10/F2-25904-23E51925 for ; Sat, 23 Nov 2013 21:02:26 -0500 Received: by mail-vc0-f176.google.com with SMTP id lf12so1842859vcb.21 for ; Sat, 23 Nov 2013 18:02:23 -0800 (PST) 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=aAu0w3YyRgm858pGJgOyRpfDeRct84ecCLG+wlqRPCM=; b=zv/zuY3YS6CFOiN33PoCexgTTDG7t45YBVVtNjSbGL4m4qjI9tolyd71paizUZs2r+ Ymnn8/BeSJIR9urfc2bFdNcxKfItjLm62A1vCpV8f5zwfNs1xBSgtPkXDj7CERO04xkq Bw9aBwk/vtRkqcDNzVcyGfFumxVHMJqJ8B+Xt+VP4VszB56+XrxtnPtZlgE/56KA+y5s 2UbS9MJNUyEKa7k/s/eS9ToAbMh+NN//gTKVi4TGH+aYtvfhlXCfBR1928SVZyX6KqZq x4uoqPAxvtjEAKHaO/Rg8MucAbrlaSQVNak+kjmjZ8vohQI0coXIKuF8qJYl9ON3VH59 bFbA== MIME-Version: 1.0 X-Received: by 10.52.116.74 with SMTP id ju10mr16156185vdb.20.1385258543734; Sat, 23 Nov 2013 18:02:23 -0800 (PST) Received: by 10.58.128.33 with HTTP; Sat, 23 Nov 2013 18:02:23 -0800 (PST) In-Reply-To: References: Date: Sun, 24 Nov 2013 10:02:23 +0800 Message-ID: To: Sherif Ramadan Cc: Kris Craig , Chris London , PHP internals list , Derick Rethans Content-Type: multipart/alternative; boundary=20cf307d01dc6be4a404ebe2a358 Subject: Re: [PHP-DEV] rfc: pow-operator From: tjerk.meesters@gmail.com (Tjerk Meesters) --20cf307d01dc6be4a404ebe2a358 Content-Type: text/plain; charset=ISO-8859-1 Hi, On Sun, Nov 24, 2013 at 9:49 AM, Sherif Ramadan wrote: > > For a comparative list of languages that implement the exponent operator > as either right-associative or left-associative I've gathered the > following, non-exhaustive list (see quasi-bibliography below)... > > | Right-associative | Left-associative | > +--------------------+--------------------+ > | Perl | VB | > | Python | BASIC | > | Tcl | Octave | > | Freemat | Matlab | > | Scilab | D | > | Sage | | > | Mathematica | | > | Haskell | | > | R | | > | Ruby | | > | Bash | | > +--------------------+--------------------+ > Awesome! Thanks for finding those; I have added them under the Discussion section. > > > Lanaguages that don't have an exponent operator > ------------------------------------------------ > > C > C++ > C# > Java > Javascript > ActionScript > > ---- > > Languages that don't have exponent operators seem to have routes from > C-style languages where > at the time no machine instruction existed for the operation and so > instead a library routine > was used. > > Certainly PHP would benefit from an exponent operator here and I don't > think going against the trend > of languages making it right-associative in order to make power-towering > easier for the user is > necessarily a bad idea. > > > Just my 0.00000002 cents! > > --- Qausi-bibliography --- > > https://plus.google.com/u/0/104277466162910953762/posts/e3jCt51VfmD > http://perldoc.perl.org/perlop.html > http://www.tcl.tk/cgi-bin/tct/tip/274.html > http://book.realworldhaskell.org/read/getting-started.html > -- -- Tjerk --20cf307d01dc6be4a404ebe2a358--