3 ms·
>The code from the book is exceedingly non-idiomatic lisp. (defconstant true t) *twitch* You weren't kidding. I'd be tempted to rewrite it if I thought an
by shawn_w 7mo ago
>The code from the book is exceedingly non-idiomatic lisp.
(defconstant true t)
*twitch* You weren't kidding. I'd be tempted to rewrite it if I thought anyone would use it.
- aidenn0 7mo agoWell most of the local bindings are a single letter, so we gotta make sure booleans stand out!
- tmtvl 7mo agoYou and me both (though I'm also annoyed by the overuse of macros instead of inline functions and the woeful lack of docstrings and type declarations).
- shawn_w 7mo agoYeah, there's a lot of comments that should be docstrings. And lots of lists that should be structures or classes...
- aidenn0 7mo agoMacros instead of inline functions is just archaic, not necessarily non-idiomatic. I'm not sure when inline declarations were added, but even well after that point macros were more reliable for getting inlining.
- tmtvl 7mo agoCalendrica has been around for that long already? How time flies. Was also interesting to find an off-by-1 bug in final (if the condition doesn't hold for initial the result is smaller than initial instead of greater than or equal to it). Interesting little program to read, though.