guile-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 4/4] Add implementation of "transcoded ports"


From: Ludovic Courtès
Subject: Re: [PATCH 4/4] Add implementation of "transcoded ports"
Date: Thu, 25 Nov 2010 22:15:03 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux)

Hi Andreas!

Andreas Rottmann <address@hidden> writes:

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

[...]

>>   - ‘binary-port?’ always returns #t.
>>
> AFAICT, there is currently no strictly correct way to tell binary ports
> and textual ports apart -- the closest thing I know about is having a
> port encoding of latin-1.  Perhaps changing it to test for that would be
> at an improvement, although on the other hand, all ports in Guile are
> binary ports in the sense that you can do binary I/O operations, such as
> `put-bytevector' on them.  So without extending the port infrastructure
> to support "disjoint" port types, the current implementation of
> `binary-port?' is probably the thing closest to the truth.

True.  We know that a transcoded port with one of the textual codecs is
textual, but we can never know if it’s “binary-only”.

I’m not sure how much of a problem it is for R6RS programs.  Actually I
cannot imagine how a program would make use of it, other than for
type-checking purposes.  Thoughts?

[...]

>> So I think “we” (i.e., you ;-)) should either implement the missing
>> stuff, or raise an exception, or print a warning when the caller asks
>> for something that’s not implemented (e.g., EOL style != native), or
>> document the current shortcomings.
>>
>
>> What do you think?
>>
> I'll try to do a mixture of all three approaches -- i.e. implement stuff
> as far as I have time and motivation, fall back on warnings, and
> document the remaining shortcomings where warnings are not feasible for
> some reason.  How does that sound?

Good!  :-)

Thanks,
Ludo’.




reply via email to

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