[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to detect a procedure
From: |
Bruce Korb |
Subject: |
Re: How to detect a procedure |
Date: |
Tue, 30 Apr 2002 18:22:54 -0700 |
Rob Browning wrote:
> > How about adding this procedure. I confess to being uncertain if it
> > actually works, I get lost trying to decipher the maze of macros.
>
> Why this over "defined?"?
>
> Not opposed, just wanted to make sure I understood the intention.
The scheme scripts for autogen may be written for a version or
environment where a procedure is defined. Later, someone may run the
script in another environment without that function. (e.g., with
a retrograde autogen) So, yes, ``(defined? 'mumble)'' is probably
adequate. I don't care a whole lot for "probably adequate". So,
I would like:
(defined-as? 'mumble scm_class_procedure)
to be equivalent to:
(and (defined? 'mumble) (procedure? mumble))
but the latter is conceptually simpler. I like simple.
It's a more rigorous test (though it can still be fooled).
[[It saves typing two characters, too. ;-) **joke!!**]]
A similar scheme could have replaced the myriad of
"procedure?" "pair?" "struct?" "symbol?" ... procedures
so you would automatically have such a function available
for any new class. Too late now, methinks.
- How to detect a procedure, Bruce Korb, 2002/04/28
- Re: How to detect a procedure, bitwize, 2002/04/29
- Re: How to detect a procedure, rm, 2002/04/29
- Re: How to detect a procedure, Lynn Winebarger, 2002/04/29
- Re: How to detect a procedure, Bruce Korb, 2002/04/29
- Re: How to detect a procedure, Rob Browning, 2002/04/30
- Re: How to detect a procedure,
Bruce Korb <=
- Re: How to detect a procedure, Rob Browning, 2002/04/30
- Re: How to detect a procedure, Lynn Winebarger, 2002/04/30
- Re: How to detect a procedure, Rob Browning, 2002/04/30