From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: Re: Short circuiting behaviour in type specific equality predicates Date: Thu, 28 Apr 2011 12:50:50 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1303993036 17508 80.91.229.12 (28 Apr 2011 12:17:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 28 Apr 2011 12:17:16 +0000 (UTC) Cc: bug-guile@gnu.org To: Ian Price Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Apr 28 14:17:10 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QFQ9d-0005Ln-HM for guile-bugs@m.gmane.org; Thu, 28 Apr 2011 14:17:09 +0200 Original-Received: from localhost ([::1]:42871 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFQ9a-0000Mj-Ut for guile-bugs@m.gmane.org; Thu, 28 Apr 2011 08:17:06 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:51956) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFQ9X-0000M2-Eg for bug-guile@gnu.org; Thu, 28 Apr 2011 08:17:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QFQ9R-0004qc-FB for bug-guile@gnu.org; Thu, 28 Apr 2011 08:17:03 -0400 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:40993 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFQ9R-0004dJ-C8 for bug-guile@gnu.org; Thu, 28 Apr 2011 08:16:57 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 060B2446D; Thu, 28 Apr 2011 08:17:53 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=N+l43xwiBnOlFKIZzYH037QKAiI=; b=I7SaE3 HQITU2je5m72uXUMD1JhQ5JzSfDB5fbrABb0qJm8PWZstamTLMoGg2Xl32U0inRP x8qGac9Te7heu6yf6+H/txWoxRYsofgoXYVjRKV0sYv5KTfxVG+1bjLl+ZMLaYZV essdieiFbFbDPgElm5zZX9Pa9zbpPMfWHQT84= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=PXldCEDkbDJIvgayuXvhAiK/bdkoO80q FdN8O48Ir8a6FDnli3iQCOivL/NNMPUJe4j4fI4/HGhMWb2lo5eZz3gtIgldxYAb Ff84Xb7Azfzuc1SMuZUHgHtiuW7sbE3HroXuIwFOdvVJCJ8vaWJG34H8tkBE17K7 N7IqBMSHJrw= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id E6DC1446C; Thu, 28 Apr 2011 08:17:50 -0400 (EDT) Original-Received: from unquote.localdomain (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 54B64446B; Thu, 28 Apr 2011 08:17:48 -0400 (EDT) In-Reply-To: (Ian Price's message of "Sun, 3 Apr 2011 21:43:54 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: 8949F39A-7191-11E0-9313-E8AB60295C12-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 64.74.157.62 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:5533 Archived-At: On Sun 03 Apr 2011 22:43, Ian Price 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/