(01-03-2014 06:43 PM)Claudio L. Wrote: It'll be interesting to gather ideas to define the language **before** we attempt an actual implementation, otherwise we might end up redoing a lot of code.
For example, what type of numbers are we going to use? what precision?
One possibility:
BINTS = 32-bit (64 would take a lot of space, or is it justified?)
REALS = (binary or decimal?) how many digits? we have decNumber which supports a lot of different precisions, but memory use and speed might suffer if we increase precision. Perhaps 34 digits (decimal128) is a good tradeoff? or an overkill?
Here's what I have so far:
- BINTs are 32 bits
- REALs are 64 bit C "doubles". I hope to change them to some decimal representation eventually. But we may want to consider keeping the binary reals in addition since they will probably be faster.
- I don't have extended reals yet but decimal128 seems like a natural fit for these.
- STRING
- CHR
- CMP, but just barely: I haven't implemented any math routines for them.
- LAM (local variables)
- IDNT, but just barely since I haven't coded directories yet.
- TAG
- ARRY
- LIST
- HEX string
- COL (RPL program)