Re: rfc: pow-operator

From: Date: Sun, 24 Nov 2013 02:02:23 +0000
Subject: Re: rfc: pow-operator
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-70342@lists.php.net to get a copy of this message
Hi, On Sun, Nov 24, 2013 at 9:49 AM, Sherif Ramadan <theanomaly.is@gmail.com>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

« previous php.internals (#70342) next »