2 ms·
define-compiler-macro handles many of the cases you describe in your first paragraph. But I agree it would be nice if more of the functions in CL were generic.
by dreamcompiler 4y ago
define-compiler-macro handles many of the cases you describe in your first paragraph. But I agree it would be nice if more of the functions in CL were generic. I think the issue is that those functions were standardized before CLOS was added and made defgeneric/defmethod a normal mechanism for writing functions.
- pfdietz 4y agoCompiler macros are an example of something added to make built-in functions more efficient, but they aren't going as far as I'd like. I mean, SBCL doesn't use them for specializing built-ins based on type information; it uses its own nonstandard mechanism, defknown. I've mentioned this before, but I'd really like to see Strandh's Call-site optimization implemented, so generic functions could be both highly locally optimizable, yet retain their dynamicity.