[fpc-pascal] rotating bits

Bisma Jayadi bisma at brawijaya.ac.id
Sat May 27 11:01:52 CEST 2006


> I agree with Michael. And I think the line is clearly drawn. The FPC  (and 
> more importantly the language syntax itself) design goal, as I understand it, 
> is to be, as much as possible, platform and architecture independent and 

I believe the bit rotation support can be made platform and architecture 
indepedent. This operation obviously needed regardless the platform or the 
architecture. It is very important for calculation algorithms and the 
implementation (e.g. simulation, graphics, encoding, math, etc) and that's why 
it IS available almost on all modern architectures. Is there any 
platform/architecture that does not require or provide this operation?

> doesn't need to be "polluted" by adding esoteric functions/(worst yet)operators 
> becuase they are neat on one particular type of machine and we just program 
> around them everywhere else.

As function it'll pollute pascal syntax, but not if it is as operator. And 
clearly the bit rotation operation is not esoteric. It's just like the reason 
why shl/shr operator exist. Make rol/ror as operator even make FPC syntax more 
clear and clean. If shl/shr can exist as operator, then why ror/rol can't? Of 
course, I also can be on contra side for the shl/shr operator if I want... with 
the exact reasons as yours. :)

> Rather, if your application really needs that function, you have a number of 
> suggestions on how to implement that within your own application, so do 
> that, but I don't think the compiler should be expected to do it for you. 

The problem is... almost everyone need it. Even the compiler itself! Like what 
Florian has told us in this thread. :)

-Bee-

has Bee.ography at
http://beeography.wordpress.com



More information about the fpc-pascal mailing list