4 ms·
> For example, if f is defuned in a file, throughout that file you can assume (f x) refers to that f and does not have to be looked up dynamically at runtime.
by ByteJockey 4y ago
> For example, if f is defuned in a file, throughout that file you can assume (f x) refers to that f and does not have to be looked up dynamically at runtime.
Unless you declare them "notinline".
http://www.lispworks.com/documentation/HyperSpec/Body/d_inline.htm#notinline http://www.lispworks.com/documentation/HyperSpec/Body/d_inli...
> so there is no motivation to write a method unless you actually want the dynamic dispatch methods provide.
Methods have some different functionality in CL than in most languages. For example, you can have the methods from the entire inheritance hierarchy (well, the classes that have had that method specialized for them) all be called as, essentially a pipeline of methods.
https://lispcookbook.github.io/cl-cookbook/clos.html#method-qualifiers-before-after-around https://lispcookbook.github.io/cl-cookbook/clos.html#method-...
But this is a discussion about dynamism of the object system, and most of that is defined before runtime. How about changing an object's class at runtime? https://www.cliki.net/site/HyperSpec/Body/stagenfun_change-class.html https://www.cliki.net/site/HyperSpec/Body/stagenfun_change-c...