Alex Shinn scripsit: > Why do we need this? That's not rhetorical, I'd like to > hear of any use cases where you think a problem could arise.
<rant> We need it because Scheme is a strongly (dynamically) typed language. If FOO passes BAR a pair, and BAR is expecting an exact integer, the programmer expects BAR (or one of its callees) to signal a type error, not to treat the pair's address as an unboxed fixnum and carry on regardless. If you want C, you know where to find it. The difference between restricted and unrestricted strings may not be as large as the distinction between pairs and fixnums, but it's the same *kind* of difference. What happens when FOO, a UTF-8-aware procedure, passes an unrestricted string to BAR, which decides to side-effect the string? The string may become, from FOO's viewpoint, gibberish. If it's BAR that passes a restricted string to FOO, then the string may be side-effected in ways that BAR didn't expect, like some of the characters in it being overwritten. Another analogy: An earlier generation of Lisp programmers is considering adding vectors to the language. Ben Bitdiddle proposes: "All we have to do is extend the allocator from allocating 2-word objects to allocate n-word objects. So CONS can take any number of arguments, and everything will Just Work. For modules that actually want to work with vectors, we'll just have a little bit of code for them to load that redefines NTH to work on vectors, and provides LIST-NTH for when those functions need to deal with lists. No need to change the core representations at all!" But Alissa P. Hacker isn't so sure. </rant> > To me the bigger problem with a module-based solution is the > complete separation of all string processing modules into > those that are utf8-aware, and those that aren't. A fork > which extends to other modules which use string-processing > modules, i.e. duplicate copies of most code. That too. -- Not to perambulate John Cowan <[EMAIL PROTECTED]> the corridors http://www.ccil.org/~cowan during the hours of repose in the boots of ascension. --Sign in Austrian ski-resort hotel _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users