From: Andy Wingo <wingo@pobox.com>
To: Ian Price <ianprice90@googlemail.com>
Cc: bug-guile@gnu.org
Subject: Re: Short circuiting behaviour in type specific equality predicates
Date: Thu, 28 Apr 2011 12:50:50 +0200 [thread overview]
Message-ID: <m34o5iodit.fsf@unquote.localdomain> (raw)
In-Reply-To: <BANLkTi=Z5Q_32AfJ69Gkd-nVZBnygj2yNw@mail.gmail.com> (Ian Price's message of "Sun, 3 Apr 2011 21:43:54 +0100")
On Sun 03 Apr 2011 22:43, Ian Price <ianprice90@googlemail.com> writes:
> scheme@(guile-user)> (= 9 10 "foo")
> $1 = #f
[...]
> I was not sure whether or not to report this, as the behaviour is VERY
> consistent and therefore, I thought, likely to have been a conscious
> design choice.
Amusingly, I don't think it was a conscious decision, despite the
consistency.
> If this is the case, you can ignore this, but it seems to me that the
> reason for having type specific equality predicates is because 1. I
> want the guarantee or 2. It could theoretically help the bytecode
> compiler give better code.
I would not be against some compile-time warning passes to check that
the arguments are of the right type, but at least for things like <
there's the possibility of goops extending the primitives to be generic,
so that e.g "bar" could be less than "foo". So producing a warning, or
indeed, even doing a typecheck, is tricky.
Thank you for investigating this issue, but unless someone feels very
strongly about it, I am inclined to punt :)
Regards,
Andy
--
http://wingolog.org/
prev parent reply other threads:[~2011-04-28 10:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-03 20:43 Short circuiting behaviour in type specific equality predicates Ian Price
2011-04-28 10:50 ` Andy Wingo [this message]
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=m34o5iodit.fsf@unquote.localdomain \
--to=wingo@pobox.com \
--cc=bug-guile@gnu.org \
--cc=ianprice90@googlemail.com \
/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).