RE: Adding slots to an existing class definition
Consider a running diagnostic system that cannot distinguish between a working and non-working unit. After some investigation, it decides that, say, input power supply voltage is an important discriminator. It then wants to add that attribute to existing classes and instances of testable boards, which will automatically cause such voltages to be measured in the future, and tracked for purposes of prognostics
Programmers correcting their own code is so… 20th century don’t you think?
From:
owner-lisp-hug@lispworks.com [mailto:owner-lisp-hug@lispworks.com] On Behalf Of keithmantell@gmail.com
Sent: Friday, July 29, 2005 5:28
AM
To: lisp-hug@lispworks.com
Subject: Fwd: Adding slots to an
existing class definition
oops, meant to send ths to the group as well!
---------- Forwarded message ----------
From: Keith Mantell
<keithmantell@gmail.com >
Date: Jul 28, 2005 2:01 PM
Subject: Re: Adding slots to an existing class
definition
To: Bob Hutchison <hutch@recursive.ca>
From the little I can glean from this ( and making a assumtions etc.) to me the
issue comes down to:
1) If you are in an interactive development mode then you add fields if
you realise you "made a mistake" - really this class should have had
these felds, but you only just realised it.
2) You subclass for "intrinsic" structural reasons ; the super class is
a valid parent of 2 or more subclasses.....
I have in mind a sort of Domain Specific Language Tool - so 1) would be
"Of course Customers have names, duh!", whilst 2) would be "
Customers who are individuals have Dates of Birth whilst Customers who are companies
have VAT numbers".
So both approaches are valid IMHO :-)
Best wishes,
Keith