CONTENTS | PREV | NEXT
8A. about the `type' system
E doesn't have a rigid type-system like Pascal or Modula2, it's even more
flexible than C's type system: you might as well call it a datatype-system.
This goes hand in hand with the philosophy that in E all datatypes are
equal: all basic small values like characters, integers etc. All have
the same 32bit size, and all other datatypes like arrays and strings
are represented by 32bit pointers to them. This way, the e compiler can
generate code in a very polymorphic way.
The (dis)advantages are obvious:
disadvantages of the E-type system
- less compiler checking on silly errors you make
- low-level polymorphism, easier to make powerful generic functions.
- flexible way of programming: no problem that some types of return values
don't match, no superfluous "casts" etc., no unnecessary errormessages.
- no hard to find errors when mixing data of different sizes in expressions