cr, lf, and reading in terminals/vim
Richard Gaskin
ambassador at fourthworld.com
Wed Oct 30 22:27:28 EDT 2019
Brian Milby wrote:
> The reason for the difficulty is that internally LC uses LF as the
> line ending. The cr, lf, and return constants all actually map to LF.
> When you write a text file, LC will convert line endings to the native
> format. So for Windows you get CRLF, Linux gets LF, and Mac gets CR.
> I take issue with this because as of OS X the native line ending for
> the OS is actually now LF...
Agreed.
The hard question is: What shall we do about it?
On the one hand, we have millions of lines of code in our community that
use CR, and a certain percentage of those are dependent on CR having a
specific value (even if that value is inconsistent with the true ASCII
value).
On the other hand, we have a constant that suggests it's one thing when
it's really something else, and at this point that design decision
benefits no one and confuses many.
Favor backward compatibility, or language learnability/usability?
--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
____________________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list