unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Bruce Korb <bkorb@pacbell.net>
Cc: Lynn Winebarger <owinebar@free-expression.org>,
	bitwize@wizards-of-source.org, guile-devel@gnu.org
Subject: Re: How to detect a procedure
Date: Tue, 30 Apr 2002 18:22:54 -0700	[thread overview]
Message-ID: <3CCF436E.C4D765DF@pacbell.net> (raw)
In-Reply-To: 87y9f5pa6e.fsf@raven.i.defaultvalue.org

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.

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


  reply	other threads:[~2002-05-01  1:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-28 20:35 How to detect a procedure Bruce Korb
2002-04-29  4:52 ` bitwize
2002-04-29  9:45   ` rm
2002-04-30  0:00   ` Lynn Winebarger
2002-04-30  0:36     ` Bruce Korb
2002-04-30 13:50       ` Rob Browning
2002-05-01  1:22         ` Bruce Korb [this message]
2002-05-01  2:35           ` Rob Browning
2002-05-01  2:46             ` Lynn Winebarger
2002-05-01  3:39               ` Rob Browning
2002-05-01 21:36                 ` Bruce Korb
2002-05-01 22:18                   ` Neil Jerram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3CCF436E.C4D765DF@pacbell.net \
    --to=bkorb@pacbell.net \
    --cc=bitwize@wizards-of-source.org \
    --cc=guile-devel@gnu.org \
    --cc=owinebar@free-expression.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).