17 Aug 19:48
Re: Use of Babel and Alexandria in CFFI
From: Luís Oliveira <luismbo <at> gmail.com>
Subject: Re: Use of Babel and Alexandria in CFFI
Newsgroups: gmane.lisp.cffi.devel
Date: 2008-08-17 17:48:33 GMT
Subject: Re: Use of Babel and Alexandria in CFFI
Newsgroups: gmane.lisp.cffi.devel
Date: 2008-08-17 17:48:33 GMT
On Sun, Aug 17, 2008 at 4:46 PM, Roland Averkamp <roland.averkamp <at> gmx.de> wrote:
> Is it really necesary to use the Babel and Alexandria libraries in CFFI?
> Now CFFI depends on two libraries and every other system which uses
> CFFI needs these two libraries too.
That's an issue that was taken into consideration.
> Some comments in Babel mention that it is only usefull for a lisp with
> unicode suppport. But for example Allegro and Clisp already have functions for
> character set conversions.
At one point, there was a CFFI branch that implemented foreign
encodings using the functionality provided by each Lisp. But the
encoding support and error semantics vary wildely and that made it a
bit useless. You can find more details about that effort in the
mailing list archives.
> I think it would be better that strings with a non native character set are handled
> like (unsigned-byte 8) or (unsigned-byte 16) arrays which are zero terminated.
> And it is up to the application to convert them, with Babel or some buildin functions.
That would introduce an extra step in the conversion:
foreign memory -> lisp array -> lisp string
A better solution, perhaps, would be to split string support into a
different system. Is it worth the trouble though?
Out of curiosity, plain-odbc seems to use strings a lot, I would
(Continue reading)
RSS Feed