Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70341 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3378 invoked from network); 24 Nov 2013 01:49:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Nov 2013 01:49:20 -0000 Authentication-Results: pb1.pair.com smtp.mail=theanomaly.is@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=theanomaly.is@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.180 as permitted sender) X-PHP-List-Original-Sender: theanomaly.is@gmail.com X-Host-Fingerprint: 209.85.212.180 mail-wi0-f180.google.com Received: from [209.85.212.180] ([209.85.212.180:63819] helo=mail-wi0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F2/92-25904-C1B51925 for ; Sat, 23 Nov 2013 20:49:17 -0500 Received: by mail-wi0-f180.google.com with SMTP id hm4so4106257wib.13 for ; Sat, 23 Nov 2013 17:49:14 -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=OFneb6ttruFOxuTeG4APBNZtY7nBqHViSKSFaIualjU=; b=BoYOZVoXkCiOo9+5CP5NMPKsfVplS2HmhqkKesdZZ+vFTwzSnRpHcwKRJAhEKEUAKn asDhjJuX9lxZgap1dANgx7fL8yA8OuBEIU0DkubagMQAirMEQoLJ1bfNlsr0EFvo9our hZQozLSWc5a6Th5VgwzhwopRFFENb0OULMApTqiiAoVFuG3tEWuCQ8b5HNfEhjywecIU 4YCUjkvS5KI/rOy0hPD8nECNOhYuTOBYGtc/Y4ICZd4fs6oie+F5DA3UymD1mlHCsFtY bU+Z9t3I29S+hd5sOWK4FA8RX15wUlLuPE0RM4yU/ijEcoWR+OHYB58oFhZYiLBrSI5+ KFNA== MIME-Version: 1.0 X-Received: by 10.180.221.38 with SMTP id qb6mr8220889wic.8.1385257754070; Sat, 23 Nov 2013 17:49:14 -0800 (PST) Received: by 10.227.198.130 with HTTP; Sat, 23 Nov 2013 17:49:14 -0800 (PST) In-Reply-To: References: Date: Sat, 23 Nov 2013 20:49:14 -0500 Message-ID: To: Kris Craig Cc: Chris London , PHP internals list , Derick Rethans , Tjerk Meesters Content-Type: multipart/alternative; boundary=001a1134d2da5ab2e504ebe27493 Subject: Re: [PHP-DEV] rfc: pow-operator From: theanomaly.is@gmail.com (Sherif Ramadan) --001a1134d2da5ab2e504ebe27493 Content-Type: text/plain; charset=ISO-8859-1 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 | | +--------------------+--------------------+ 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 --001a1134d2da5ab2e504ebe27493--