class definition dependencies

From: Brian Denheyer <briand_at_deldotd.com>
Date: Sat, 20 Feb 1999 23:17:36 -0800 (PST)

Let's says I have classes A & B :

File A
(define-class <class-a> () ...)
(define-method foo ((a <class-a>) (b <class-b>)) ...)

File B
(define-class <class-b> () ...)
(define-method foo ((a <class-a>) (b <class-b>)) ...)

Oops. If A does (require "B") everything is OK. If B then does
(require "A"), I have a cycle and stk gets upset (rightly so).

It looks to me like I must put the class definitions into A and B and
then create a 3rd file C which holds the method definitions. Does
this make sense or am I missing something ?

Doing this makes A and B look suspiciously like header files, and that
makes me think I'm doing something wrong. This situation must be very
common, so I am wondering of there is a better way to handle it.

Brian
--
Brian Denheyer             briand_at_deldotd.com
Deldot Design, Inc.        (503) 788-1607
__              
\/.d = Electronic design and development
Received on Sun Feb 21 1999 - 08:18:11 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST