3 ms·
I really wish someone would put together a new standardization of Common Lisp. The language could be much better with a few minor tweaks: for example, (function
by quotemstr 7y ago
I really wish someone would put together a new standardization of Common Lisp. The language could be much better with a few minor tweaks: for example, (function +) should be a generic function --- that it is isn't is a silly oversight. Compiler macros should have access to type inference information so that they can do a better job: right now, they're purely syntactic and give up lots of optimization potential as a result.
- flavio81 7y agoWe already have all of the above in the form of libraries. Common Lisp is extensible.
- quotemstr 7y agoWe don't have any of those. #'+ is part of the core and can't be extended. There's also no facility for type propagation in library form.
- kgwgk 7y agoYou can shadow + and use your own implementation in your code, falling back to cl:+ when appropriate. Changing the existing language may be difficult, but building a modified language on top of it is possible: see Shen.
- vindarel 7y agoTo extend #'+, equality functions and much more, see https://github.com/alex-gutev/generic-cl/ https://github.com/alex-gutev/generic-cl/. See also https://github.com/pnathan/generic-comparability https://github.com/pnathan/generic-comparability