Re: Re: [Zend Engine 2] Right/Left Shift Zero Fill operator
| From: | Vlad Krupin | Date: | Mon, 10 Sep 2001 18:14:02 +0000 |
| Subject: | Re: Re: [Zend Engine 2] Right/Left Shift Zero Fill operator | ||
| References: | 1 2 3 4 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-65680@lists.php.net to get a copy of this message | ||
FWIW:
Signed shift seems to make little sense to me personally, since we are just dealing with a row of bits, and if you really want to do a quick multiplication/division, you might just as well use a * or / operator - it is not going to hurt that much:). *However*, it's been possible in different languages since before I had my first computer (e.g. SHL/SHR and SAL/SAR in asm x86), so we might provide the same functionality and create a new operator to discriminate between signed and unsigned shifts.Just a thought. Don't kill me if that would be polluting the language.
Vlad
Alexander Wirtz wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Jason et al., On Monday 10 September 2001 16:24, Jason Greene wrote:Is there anyone out there who uses >> on negative numbers? There is the discussion on the engine2 list about whether to make >> an unsigned right shift, or to introduce a new operatorI'd be grateful, if the behaviour of >> won't change, as I'm using it in some scripts for exactly this purpose. A >>> is the usual unsigned right-shift in c-style languages, it wouldn't hurt to introduce it to PHP as well, would it?.Speak-up or potential loose your negative shift-abilityDone :) Best Regards, Alex - --| Alexander Wirtz | eMail: wirtz@web-active.com | | web@ctive GmbH | "Accidents, Emergency, Ambulance" |-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE7nNSEDTqTaMH1weIRAhdBAKCbojb6+0yw1alYGS1tQgydLAcfEQCg24wE ssB1EoyRTzQY2R1jQhAcJDw= =zebw -----END PGP SIGNATURE-----