unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Dirk Herrmann <dirk@sallust.ida.ing.tu-bs.de>
Cc: Neil Jerram <neil@ossau.uklinux.net>, guile-devel@gnu.org
Subject: Re: illegal uses of define in guile
Date: Tue, 15 Oct 2002 08:15:17 +0200 (CEST)	[thread overview]
Message-ID: <Pine.GSO.4.05.10210150810510.29557-100000@sallust.ida.ing.tu-bs.de> (raw)
In-Reply-To: <3DAB5ED4.D4C95AFD@pacbell.net>

On Mon, 14 Oct 2002, Bruce Korb wrote:

> Neil Jerram wrote:
> 
> >     >> Currently, guile allows the following:
> >     >> (if (not (defined? '%load-verbosely))
> >     >> (define %load-verbosely #f))
> > 
> >     Bruce> I do that.
> > 
> > I do too; however, I guess one could instead write this:
> > 
> > (define %load-verbosely
> >         (if (defined? '%load-verbosely)
> >             %load-verbosely
> >             #f))
> > 
> > Would this work?
> 
> Even if it worked in that example, it leaves open:
> 
>   (if (some-sort-of-context-test)
>       (begin
>         (define ....)
>         ...
>   )   )
> 
> 'cuz that's where I'd really have my problem.  :-(

I wonder what people's objective is when they use these constructs?  Do
you really want to construct two different top-level environments, where
once the symbol has a definition and once it has not?  Are you (mis)using
the definedness of a symbol as a means to communicate boolean values?

Do other scheme implementations allow this?

Best regards
Dirk Herrmann



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


  reply	other threads:[~2002-10-15  6:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-14 17:17 illegal uses of define in guile Dirk Herrmann
2002-10-14 17:49 ` Bruce Korb
2002-10-14 19:42   ` Neil Jerram
2002-10-15  0:18     ` Bruce Korb
2002-10-15  6:15       ` Dirk Herrmann [this message]
2002-10-15 10:49         ` tomas
2002-10-15 13:33         ` rm
2002-10-15 13:58         ` Bruce Korb
2002-10-15 12:45 ` rm
2002-10-18 21:55 ` Marius Vollmer
  -- strict thread matches above, loose matches on Subject: below --
2002-10-19 15:22 Dirk Herrmann
2002-10-19 15:44 ` Marius Vollmer
2002-10-21 10:04 ` tomas
2002-11-03 16:28   ` Marius Vollmer
2002-11-04 10:21     ` tomas

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=Pine.GSO.4.05.10210150810510.29557-100000@sallust.ida.ing.tu-bs.de \
    --to=dirk@sallust.ida.ing.tu-bs.de \
    --cc=guile-devel@gnu.org \
    --cc=neil@ossau.uklinux.net \
    /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).