From: Christophe R. <cs...@ca...> - 2005-02-17 17:29:07
|
Raymond Wiker <Ray...@fa...> writes: > Would it be an idea to make SBCL be a bit more tolerant about > line termination? I don't think so. What would be nice, I think, would be to extend the currently very rudimentary external-format support, so that one could specify to COMPILE-FILE and LOAD that the file you're dealing with has (:newline-style :cr) or somesuch. Why don't I like "tolerance"? Well, newline characters are significant in various contexts: within "strings", |escaped symbols| and (my favourite) after a ~ in a format string. If we start getting tolerant we actually have to think about what some reasonable default (for all users) behaviour is, how to make users aware that something odd has been smoothed over (for those cases where the default is wrong but the user isn't aware of the problem), and how to customize it. By being brittle, people are immediately aware of an issue: an issue which is larger than just newline termination -- it affects natural language comments (and source code!) too. That issue is how to turn a bunch of bytes (on disk or off the network) into a bunch of characters -- and I really think that this is such a complex issue that I'm even a bit nervous about forgiving bad encodings in comments; certainly, converting all byte values of 13 to Newline is completely the wrong answer: just wait until Brian Spilsbury or some other far-East hacker wants comments in Korean... Cheers, Christophe |