Re: Request for Feedback - Unsigned Right Shift Operator

From: Date: Tue, 02 Apr 2002 05:28:30 +0000
Subject: Re: Request for Feedback - Unsigned Right Shift Operator
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-91076@lists.php.net to get a copy of this message
CPU designers don't make their CPU's support an instruction like slau (shift left arithmetic unsigned) for simplicity of instruction set architecture. Anyway simplicity of instructions is not important for PHP. When one wants to use <<<, let them use it. -- martina. "Jason Greene" <jason@php.net> wrote in message news:1017703250.2203.48.camel@localhost.localdomain... > > Hello All, > > One of the features that I have been working on for PHP5/Zend Engine 2 > is better unsigned value support for the language. This involves the > addition of a new operator, '>>>' (Unsigned Right Shift). It works the > same as a normal right shift operator, except that it does not hold the > sign during the shift. > > Example: > > 1<<31>>31 == -1 > 1<<31>>>31 == 1 > > Everyone is in agreement on the new operator, however, a few of us have > had a discussion over whether we should add an equivalent '<<<' > operator. The main reason for this would be that it would make the > language more consistent. However, the argument against adding it is > that it is not necessary because there is no technical difference > between << and <<< > > > Feedback anyone? > > Thanks, > > -Jason > > >

« previous php.general (#91076) next »