[gambit-list] define-type
David St-Hilaire
sthilaid at iro.umontreal.ca
Thu May 28 08:23:09 EDT 2009
lowly coder wrote:
> It appears ##structure-type is what I want.
>
> Anyone smarter than me want to either:
>
> (1) confirm this is the right answer
> or
> (2) tell me why using ##structure-type for this purpose is a bad idea?
>
1,2: From my point of view, ## calls should be avoided if possible. I
would suggest to dispatch using a cond form like:
(cond ((foo? x) ...) ((bar? x) ...))
This gets annoying for multiple dispatch, but then again, you're
probably much better to use an object system for gambit! There are a
couple of them on the dumping ground, ranging from very simple ones to
more complete and elaborate ones.
Good luck ;)
David
More information about the Gambit-list
mailing list