On 09/04/14 13:30, "Jörg F. Wittenberger" wrote:
> Am 29.08.2014 20:50, schrieb Oleg Kolosov:
>> On 08/23/14 19:35, Peter Bex wrote:
>>> I've made a start on the wiki, at what we'd like CHICKEN 5 to be about.
>> I've remembered one more thing: why not stick the terminating '\0' at
>> the end of all strings in internal representation? This looks pretty
>> harmless but could make some common FFI uses a breeze.
>
> Don't, please.
>
> a) This would make "some forms of abuse" "safe anyway".  But internal
> \0 would have to handled for correct programs anyway. Eventually one
> ends up rewriting mostly working code at that point.
>
> b) I don't recall the full story.  But we had precisely this problem
> once with RScheme (which does have this terminating \0).  In the end
> Donovan Kolbly (creator of RScheme) commented on the topic: "I was
> young."
>
> _______________________________________________
> Chicken-hackers mailing list
> Chicken-hackers@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-hackers

This might be entirely point of view issue, but I don't see the problem
in allowing some abuse to gain performance, with the assumption that the
user knows what he is doing. In our commercial system we have few
applications where CHICKEN's string handling was found as a bottleneck
(indexing large number of database entries, filtering lists of thousands
of file names, etc.). Equivalent pure C version is few times (sometimes
order of magnitude) faster with the same algorithms. Even doing heavy
lifting in C and just pushing data back to CHICKEN hurts performance a
lot (our GUI is written in Scheme).

So, all the convenience and safety of high level language is meaningless
because we ended up not using it for those applications.

-- 
Regards, Oleg Kolosov


_______________________________________________
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to