From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Rottmann Newsgroups: gmane.lisp.guile.devel Subject: Re: binary-port? Date: Sat, 23 Apr 2011 03:48:30 +0200 Message-ID: <87sjt9agb5.fsf@gmx.at> References: <871v0tudjg.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1303523331 21513 80.91.229.12 (23 Apr 2011 01:48:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 23 Apr 2011 01:48:51 +0000 (UTC) Cc: guile-devel@gnu.org To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Apr 23 03:48:46 2011 Return-path: Envelope-to: guile-devel@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 1QDRxl-0001A6-8y for guile-devel@m.gmane.org; Sat, 23 Apr 2011 03:48:45 +0200 Original-Received: from localhost ([::1]:52705 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QDRxk-0007xb-M0 for guile-devel@m.gmane.org; Fri, 22 Apr 2011 21:48:44 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:43834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QDRxh-0007xW-Ol for guile-devel@gnu.org; Fri, 22 Apr 2011 21:48:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QDRxf-0002U2-J7 for guile-devel@gnu.org; Fri, 22 Apr 2011 21:48:41 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:33078) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QDRxf-0002Tt-8O for guile-devel@gnu.org; Fri, 22 Apr 2011 21:48:39 -0400 Original-Received: (qmail invoked by alias); 23 Apr 2011 01:48:36 -0000 Original-Received: from 83-215-154-5.hage.dyn.salzburg-online.at (EHLO nathot.lan) [83.215.154.5] by mail.gmx.net (mp051) with SMTP; 23 Apr 2011 03:48:36 +0200 X-Authenticated: #3102804 X-Provags-ID: V01U2FsdGVkX19byywjYz9b21DV4Ace7pJ3YnfPSsftTFQie68LyH AELmyQhdZNA/SF Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by nathot.lan (Postfix) with ESMTP id 7068E3A69B; Sat, 23 Apr 2011 03:48:35 +0200 (CEST) Original-Received: from nathot.lan ([127.0.0.1]) by localhost (nathot.lan [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x4ypc8SFgqRV; Sat, 23 Apr 2011 03:48:31 +0200 (CEST) Original-Received: from delenn.lan (delenn.lan [192.168.3.11]) by nathot.lan (Postfix) with ESMTP id 6E98B3A696; Sat, 23 Apr 2011 03:48:31 +0200 (CEST) Original-Received: by delenn.lan (Postfix, from userid 1000) id 24C3B2C00C8; Sat, 23 Apr 2011 03:48:31 +0200 (CEST) In-Reply-To: <871v0tudjg.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Sat, 23 Apr 2011 00:28:03 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 213.165.64.23 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:12317 Archived-At: ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Hello, > > I just pushed 96128014bfaabe9e123c4f4928ce4c20427eaa53, which makes > =E2=80=98binary-port?=E2=80=99 deterministic for ports intended to be bin= ary. > Glad to see that! > However, I=E2=80=99m wondering whether we should not just squarely do awa= y with > the binary/textual distinction, and just write: > > (define (binary-port? p) #t) > > What do people with experience with pure R6RS code think? Is the > distinction actually used, and how? > I can only find one example in the code I wrote: `copy-port', which works (with the probably obvious semantics), on both binary and textual ports. On Guile, when `binary-port?' would return #t for all ports, `copy-port' would break, losing the transcoding effect you'd get when you pass two textual ports of different encodings. With the current behavior, you still have to watch the order of your port type checks, testing for `binary-port?' first, whereas on systems following R6RS strictly, you'd get the same behavior regardless of type check order. I can live with the latter, but the former would be unfortunate, IMHO. Regards, Rotty --=20 Andreas Rottmann --