unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Andreas Rottmann <a.rottmann@gmx.at>
To: ludo@gnu.org (Ludovic Courtès)
Cc: guile-devel@gnu.org
Subject: Re: binary-port?
Date: Sat, 23 Apr 2011 03:48:30 +0200	[thread overview]
Message-ID: <87sjt9agb5.fsf@gmx.at> (raw)
In-Reply-To: <871v0tudjg.fsf@gnu.org> ("Ludovic Courtès"'s message of "Sat, 23 Apr 2011 00:28:03 +0200")

ludo@gnu.org (Ludovic Courtès) writes:

> Hello,
>
> I just pushed 96128014bfaabe9e123c4f4928ce4c20427eaa53, which makes
> ‘binary-port?’ deterministic for ports intended to be binary.
>
Glad to see that!

> However, I’m wondering whether we should not just squarely do away 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
-- 
Andreas Rottmann -- <http://rotty.yi.org/>



  reply	other threads:[~2011-04-23  1:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-22 22:28 binary-port? Ludovic Courtès
2011-04-23  1:48 ` Andreas Rottmann [this message]
2011-04-23 19:56   ` binary-port? Ludovic Courtès
2011-04-24  6:39     ` binary-port? Marco Maggi
2011-04-24 13:03       ` binary-port? Ludovic Courtès
2011-04-25 11:55     ` binary-port? Andreas Rottmann
2011-04-25 14:08       ` binary-port? Ludovic Courtès
2011-04-25 14:20         ` binary-port? Andy Wingo
2011-04-26  0:16         ` binary-port? Andreas Rottmann
2011-04-26 15:00           ` binary-port? Ludovic Courtès

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=87sjt9agb5.fsf@gmx.at \
    --to=a.rottmann@gmx.at \
    --cc=guile-devel@gnu.org \
    --cc=ludo@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).