"default" functions?


#1

Just an idea: have you considered providing some “default functions” in order to save cons cells? — I have no idea how ulisp is really designed (I am not knowledgeable enough to “get it”, sorry), but I am thinking of something like (defun f00 () nil) being pre-set, e.g. for f00-f99 or thelike, and the user may set the functions to whatever he wants. That will make things a bit less readable, sure (as you really “outsource the semantics” to the user, who now has to remember whatever f37 “actually” stands for). But might it be possible to save some RAM that way, particularly on lower-spec Arduinos, as you don’t have to remember the user’s syntactic naming choice?

(I wanted to suggest “default symbols”, too, but - these are not necessary: essentially, NUMBERS are “default symbols”. You can remember that if 1=Hello and 2=World, (1 2) means Hello World.)

Not sure this is tangibly beneficial.


#2

Interesting suggestion, but I don’t think it would actually save any space. If you use symbols of three alphabetic characters or fewer, uLisp packs them into a single word (using radix 40 encoding), which is about as efficient as you could get. And you still have the benefit that you can make your three-character symbols fairly mnemonic.