From: Brian M. <br...@ma...> - 2005-06-28 23:52:38
|
On Jun 27, 2005, at 6:35 PM, William Harold Newman wrote: > In my experience this DEFMETHODish syntax approach is strictly more of > a headache than the DEFSTRUCTish > macro DEFINE-ALIEN-CALLBACK (name &key calling-convention) return- > type > typed-lambda-list &body forms > with shorthand > macro DEFINE-ALIEN-CALLBACK name return-type > typed-lambda-list &body forms > The DEFSTRUCTish way is not especially pretty, but I find it usually > gets the job done. However, my experience does not include the > possibility that NAME might want to be a list (generalized alien > function names! What could be more necessary?) and probably other > accidents as well, so take it as a suggestion, rather than a confident > judgement. If you do have a generalized alien function name :-) you can say (define-alien-callback ((setf foo)) ...) - simply using the "long form" is enough disambiguation here. I think I'd like to see the defstructish form with all options in the &key part of the destructuring of the first argument; this will make define-alien-callback forms easier to parse, easier to extend and easier to define as a compatibility macro on some other implementation. -- Brian Mastenbrook br...@ma... http://www.iscblog.info/ |