guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: binary-port?


From: Ludovic Courtès
Subject: Re: binary-port?
Date: Sat, 23 Apr 2011 21:56:38 +0200
User-agent: Gnus/5.110015 (No Gnus v0.15) Emacs/23.3 (gnu/linux)

Hi Andreas!

Andreas Rottmann <address@hidden> writes:

> address@hidden (Ludovic Courtès) writes:

[...]

>> 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.

Interesting.  Can you post a link to the code?

Anyway, that’s probably enough to keep the current semantics in 2.0.

> 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.

Do you know what Industria, Nausicaa, & co. do?

Likewise, any idea which Schemes have disjoint binary/textual ports, and
which don’t?

Thanks,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]