3 ms·
The point of annotations is to avoid having to branch on type at runtime. Consequently, whatever you sent in was assumed to be what the annotation was. There
by bsder 2y ago
The point of annotations is to avoid having to branch on type at runtime.
Consequently, whatever you sent in was assumed to be what the annotation was. There was no "compilation phase" to ensure that the type at the call point actually matched the type in the annotation. If those differed, then your program would just go boom.
Now, it could be that I'm remembering something other than MACLISP. It's been a lot of years.
- gumby 2y agoMACLISP was most definitely a compiled language, it’s just that like modern Lisps you could mix the two (compiled and interpreted code). I tried to be clear by using the modern terminology “generic function”. If you compile a function with those annotations you’d end up with two functions: one that could be called if you knew the types at compile time and one that did not.
- bsder 2y agoApparently I am confusing LISPs. My fault.