chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] Numbers egg interaction with other compiled code.


From: Alex Shinn
Subject: Re: [Chicken-hackers] Numbers egg interaction with other compiled code.
Date: Sat, 24 Oct 2009 10:40:44 +0900
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (darwin)

John Cowan <address@hidden> writes:

> Tony Sidaway scripsit:
>
>> An alternative might be to provide chicken-install with the capability
>> to produce parallel egg binaries--one with numbers and one without--on
>> an egg-by-egg basis.  
>
> That way lies a combinatorial explosion.  The utf8 egg is just like
> the numbers egg in this respect, only worse, because when a utf8-aware
> module passes a string to a vanilla module, the vanilla module *thinks*
> it understands it.  Boom, especially if the vanilla module mutates
> the string.

I'm not sure whether to consider this worse or better.

On the one hand, you lose the immediate error reporting and
instant diagnosis of the problem (oh, this egg isn't using
numbers).  Not that there's currently any easy way to _fix_
that problem apart from installing your own modified version
of the egg.

On the other hand, in 95% of cases external libraries don't
need to treat a string as utf8 and it will work fine.
Parsing, searching, and constructing strings from an
ASCII-centric library will all work perfectly fine when
passed utf8 strings.  Rendering strings, where you need to
map each character to a glyph, is one of the few tasks that
needs to know you're using utf8.  Fortunately, the C
libraries Chicken binds to that care about this (gtk, sdl,
freetype) all expect utf8 strings, so this just magically
works out.

I'd really like to know if anyone has ever had breakage
because of passing a utf8 string to an egg that isn't utf8
aware.

-- 
Alex




reply via email to

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