chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] iconv egg patch


From: Hugo Arregui
Subject: Re: [Chicken-users] iconv egg patch
Date: Thu, 13 Aug 2015 13:13:26 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

> You can take the svn egg repo as a base (that's where it's currently hosted).
> We can give you access to it if you like, or you could import the egg into
> a git or mercurial repository and we can change the URL.

Thanks Peter! I imported the code into a github repository, I will let
you guys know when is ready for the URL change.

One question though, I found a couple of things I would like to improve:

- I think the documentation is a bit misleading when it says (about
iconv procedure), "The resulting string is returned (or #f if the
implementation runs out of memory)."

But it can actually return #f on error too (check here if you like:
https://github.com/hugoArregui/iconv/blob/master/iconv.scm#L85).

- The iconv procedure has an `invalid` parameter, which defaults to "?".
When an invalid sequence is found, the `invalid` string is appended to
the output string for each wrong byte found. Maybe this is desirable
sometimes, but there is no way to actually raise an error on this case.
So, I will just add an alternative, and if invalid is #f, an error will
raise. However, I think raising an error on invalid input is a much
saner default, but this breaks backward compatibility

I would really like Alex Shinn's opinion on this one, because he has two
eggs using iconv. Hope he's reading this.

But anyway, my question is: both of this items are related to backwards
compatibility, what do you think is the best choice here? should I just
change it (if Alex Shinns and perhaps something else who is using it
agrees with these changes), should I create another procedure and
deprecate this one?, should we call it iconv2 and deprecate iconv?.

Thanks.
Regards,
Hugo

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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