[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 9fd4e3: Use LF instead of CR as image/*.st line ending

David T. Lewis lewis at mail.msen.com
Fri Apr 28 03:10:30 UTC 2017


On Thu, Apr 27, 2017 at 07:10:58PM -0700, tim Rowledge wrote:
>  
> 
> > On 27-04-2017, at 7:06 PM, Ben Coman <btc at openinworld.com> wrote:
> > 
> > Is there something particularly Smalltalk related I'm not aware of that makes CR-only line endings preferable?
> 
> Err, yeah. It???s how Smalltalk works.
> 
> tim

Right.

If you insist on using an operating system that does not understand the
concept of a record oriented file system, then you need to simulate it
with some sort of agreed convention for line ending.

Emphasis on "agreed convention".

One possible way to achieve the agreed convention is to insist that
every human person in the universe must use UNIX(tm), or some derivative
thereof.

But the agreed convention for representing "end of line" in Smalltalk
happens to be different from the equally arbitrary convention on Unix,
which also happens to be different from the even more awkward but
equally arbitrary convention for MS-DOS (aka Windows).

So - the agreed convention for Smalltalk is and always has been to
use CR to represent end of line. And if we choose to display Smalltalk
source in some way that requires line endings, such as (for example)
a diff on GitHub, then it should be the responsibility of the tools
on GitHub to figure out what is "a line of text" in the diff.

But we might not be able to influence the conventions on GitHub. In
that case we may need to suffer the indignity of converting our line
end conventions to UNIX(tm) for storage on GitHub, and converting
them back to the original format when we use them in Smalltalk.

Ick. But it works, and it makes diffs display nicely on GitHub.

Dave



More information about the Vm-dev mailing list