Re: Structures as literals

"Tim Bradshaw (as tfb at cley dot com)" <[email protected]>
Newsgroups gmane.lisp.lispworks.general
Message-ID <[email protected]>
On 2 Mar 2026, at 19:21, Martin Simmons <[email protected]> wrote:
> 
> "Only the programmer who designed a class can know the correct
> way to reconstruct objects of that class at load time, therefore
> the reconstruction should be controlled by a generic function."
> 
> and:
> 
> "The default for class objects and structures is to signal an error,
> rather than picking some particular object reconstruction technique,
> because no reconstruction technique is appropriate for all objects.
> It only takes two lines of code, as in example 4, to instruct the
> compiler to use the technique that most often has been suggested
> as the default."

Yes, I think my view has shifted over the years.  In the 90s I am very sure I would have argued like that: there is no method that can work in general, and therefore no method which often works should be provided.  Now I would argue the other way, perhaps: may be there should be such a default method (as LW provides).  On the other hand it can lead you into terrible traps.

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
[email protected]
http://www.lispworks.com/support/lisp-hug.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.