[Oberon] RE: Oberon digest, Vol 1 #57 - 10 msgs

Frank van Riet Fvanriet at spescom.com
Tue Aug 27 13:58:19 CEST 2002


Hi all

I', really happy that I sparked some productive discussion which does not
revolve around
mice and fonts :) !

I'm really uncomfortable with trying to hide the size of variables i.e.
having a single integer
type. I feel that this actually detracts from the portability of the code.
In representing numbers
we have physical representations of abstract entities. We only have a finite
number of bits available
on a given machine. That in itself is usually not a problem, the problem
arises when we have need to
port code to a different machine as was pointer out by Patrick. Most people
are aware of the architecture
specific nature of C's "int"-type.

I believe programming should be very pedantic. In fact, in a programming
language on which I worked we did
away with "generic terms" for integer variables. The basic integer types of
the language were

UINT8,INT8
UINT16,INT16
UINT32,INT32

The sub-class super class semantice are the same as for Oberon namely a
larger integer type contains
the smaller type. Signed and unsigned types are incompatible. In fact the
concept was taken even further
to contain explicit set sizes:

SET8,SET16 and SET32

Internally operations are still performed on 32-bit sets, but does the
necessary conversions on loading and
storing. As such it is mostly syntactic lolli-pops, but does get rid of all
those ghastly SYSTEM.VALs

The benifit of all this is that it is easy to extend to say UINT64 of INT128
to add support for new architectures
without breaking existing code or the other way around.

In the interim the most sensible solution would be to simply write a
separate module for each architecture, that implements
unsigned operations and types.

Patrik don't worry I don't expect changes to Oberon any time soon. It's just
ideas being tossed around. In the 
final analysis that why were here :)
  
  Frank
---------------------------------------
Frank van Riet (Software Developer)
Datavoice  (Pty) Ltd 
Snail mail	PO Box 582
		Stellenbosch 7599 
		South Africa 

Tel         +27 21 888-2118
Mobile	+27 82 970 5704

Web 	      http://www.datavoice.co.za
----------------------------------------

  



More information about the Oberon mailing list