guile-devel
[Top][All Lists]
Advanced

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

Re: The “binary-friendly” Latin-1


From: Andy Wingo
Subject: Re: The “binary-friendly” Latin-1
Date: Fri, 28 Jan 2011 12:15:37 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

On Wed 26 Jan 2011 19:31, Mike Gran <address@hidden> writes:

> recv, send, etc are clearly bytevector routines.  But, if you want to keep
> backward compatibility, you should have it handle both cases.
>
> IMHO, the idea of deprecating the use of strings is the wrong one.  Either
> be bold and get rid of strings for 2.0, or let them be both bytevector
> and string functions for the foreseeable future.
>
> If strings remain an option, there will have to be some mention of the
> "binary-friendly" Latin-1 encoding.  ;-)

I think recv and send should operate on bytevectors.

I also think that if Guile is compiled with deprecated code enabled,
strings should be supported, noting that the send message should be a
latin-1 string, and that received bytes will be interpreted as latin-1
characters.  If passed a string, these functions will issue deprecation
warnings.  We change the documentation to speak of bytevectors and not
strings.

This way we provide the correct interface, while not breaking old code,
instead indicating the action that people should take to adapt their
code.

Andy
-- 
http://wingolog.org/



reply via email to

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