4 ms·
> And woe betide you if you happened to violate the preconditions of one of those annotations. Umm, this is MACLISP we're talking about -- you know the types a
by gumby 2y ago
> And woe betide you if you happened to violate the preconditions of one of those annotations.
Umm, this is MACLISP we're talking about -- you know the types at runtime and can pass the unspecialized argument to an ordinary function. A kind of generic function I suppose, though we didn't use that vocabulary back then.
Just because this was 50 years ago doesn't mean that programmers were morons.
- bsder 2y agoThe 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.