From: Marius Vollmer <mvo@zagadka.de>
Cc: guile-devel@gnu.org
Subject: Re: typechecking
Date: Mon, 17 May 2004 20:31:24 +0200 [thread overview]
Message-ID: <8765auq51f.fsf@zagadka.ping.de> (raw)
In-Reply-To: <16551.33946.660778.142166@localhost.localdomain> (Han-Wen Nienhuys's message of "Sun, 16 May 2004 17:11:22 +0200")
Han-Wen Nienhuys <hanwen@xs4all.nl> writes:
> that doesn't really answer my question. It seems to me that
>
> if (obj == gh_symbol2scm("bla"))
> ...
>
> is safe.
It does currently work, and will likely continue to work for a very
long time. (Even with the strange nil/#f/() tryptich planned for
getting Elisp into Guile.) However, for a proper abstract data type
like SCM, it would be cleaner to use SCM_EQ_P. Setting
DEBUG_TYPE_STRICTNESS to 2 will not allow direct comparisons.
> Do I understand correctly that disallowing this is a side
> effect of trying to disallow
>
> if (obj)
> ...
No, I don't think so. The two cases seem very different to me. "if
(obj)" will never be correct since the SCM encoding that is considered
false by C will never occur, and more importantly, SCM_BOOL_F is not
false when seen directy by C.
--
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
next prev parent reply other threads:[~2004-05-17 18:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-28 13:04 typechecking Han-Wen Nienhuys
2004-05-10 21:34 ` typechecking Marius Vollmer
2004-05-10 21:47 ` typechecking Dale P. Smith
2004-06-10 16:16 ` typechecking Marius Vollmer
2004-05-10 22:57 ` typechecking Han-Wen Nienhuys
2004-05-15 9:16 ` typechecking Dirk Herrmann
2004-05-16 15:11 ` typechecking Han-Wen Nienhuys
2004-05-17 18:31 ` Marius Vollmer [this message]
2004-05-26 17:40 ` typechecking Han-Wen Nienhuys
2004-05-30 8:40 ` typechecking Dirk Herrmann
2004-05-30 8:28 ` typechecking Han-Wen Nienhuys
2004-05-31 7:05 ` typechecking Dirk Herrmann
2004-06-10 16:22 ` typechecking Marius Vollmer
2004-05-30 14:00 ` typechecking Andy Wingo
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=8765auq51f.fsf@zagadka.ping.de \
--to=mvo@zagadka.de \
--cc=guile-devel@gnu.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).