Re: Finding the applicable methods...

"David McClain (as dbm at refined-audiometrics dot com)" <[email protected]> Tue, 14 Jul 2026 17:19:15 -0700
Newsgroups gmane.lisp.lispworks.general
Message-ID <[email protected]>
Another thing enabled by having a NODE class is error checking for suitable arguments.

However, there comes a trade-off between excessive error checking against errors that you know will never be encountered. That checking saps speed of execution and also wastes the memory on compiled code that will never be needed.

Lisp and Forth both come from eras when memory was really tight and expensive, and both generally go light on error checking. 

viz. The Lisp compiler in LW makes use of Environment objects, and each slot in the Environment is supposed to contain a list or a tree of items that pertain to that slot's purpose - functions, lexical bindings, etc. But you can clearly see that LW is not doing tight error checking on the contents of those lists. Those lists do not contain a type code.


> On Jul 14, 2026, at 15:08, David McClain (as dbm at refined-audiometrics dot com) <[email protected]> wrote:
> 
> Yes, you are right… I reluctantly surrendered to the typed STRUCT, aka without (:TYPE VECTOR). 
> 
> That gives me the chance to use the LW Inspect to show multiple different views of a RB-TREE, including a nice graphical view, thanks to the LW GRAPH pane.
> 
> 
> 
> 
>> On Jul 14, 2026, at 14:48, Tim Bradshaw <[email protected]> wrote:
>> 
>> On 14 Jul 2026, at 22:20, David McClain (as dbm at refined-audiometrics dot com) <[email protected]> wrote:
>>> 
>>> I am tempted to conclude that there is no difference in speed, and a small’ish cost in memory using the DEFSTRUCT without the (:TYPE VECTOR).
>> 
>> On the other hand there's the cost of there not being a useful type / class.  (I am not saying that this might not be a price worth paying!)
> 
> 
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users
> [email protected]
> http://www.lispworks.com/support/lisp-hug.html


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
[email protected]
http://www.lispworks.com/support/lisp-hug.html