[squeak-dev] support of various line ends in trunk
siguctua at gmail.com
Tue Nov 17 12:06:56 UTC 2009
2009/11/17 Juan Vuletich <juan at jvuletich.org>:
> Hi Stephan,
> stephan at stack.nl wrote:
>> Juan wrote:
>>> Showing all in the same way is misleading. Different Strings should look
>>> different in the editor!
>> Why should they? No system (old mac, unix, dos) has the correct
>> ASCII behaviour and no user expects them to. Squeak is multi-platform
>> and has its own internal conventions.
> The purpose of an editor is to show the user the characters that comprise
> the String being edited, and allow him to add / remove characters at will.
> This is so obvious that I feel silly saying it. Why would some characters be
> silently messed by the system? I see no reason. It is like the horrible
> "ASCII mode" in FTP, that breaks every file it downloads.
>> Conversion should always default
>> towards the internal conventions, with the possibility to override that
>> behaviour. Default write-out should be to platform standard, eliminating
>> multi-convention line ends. If the user wants something different, she
>> knows enough to override the defaults.
> Squeak is not an application. Squeak is an object environment. Squeak
> editors don't edit files. They edit Strings. The behavior of the editors and
> that of the code used to read the strings from files or to store them back
> to files are completely unrelated issues. There could be no files at all. Or
> the files could be in a web server or whatever. They could be dynamically
> created by some other application. They could be part of an object you're
> inspecting. Assuming there is a well known "platform standard" to follow is
> wrong. May be in an application... Then the programmer doing that
> application might do whatever conversion fit his needs. But the base system
> should do none by default.
and it doesn't.
You seem mixing the roles of:
- text reader/writer/converter
- text editor
- different system utils, for convenience, providing a text
reader/writer(s) with default or auto-detect or platform-specific line
- a text editor expects a string which having only cr as a line
ending markers in input string/stream. PERIOD.
- text editor, if requested could convert an edited text from its
internal representation back into string with cr's, ready to use
by/for any other means outside of it. PERIOD.
- basically, text editor should not mess with ANY control characters
beyond its internal representation/needs. PERIOD.
>> Stephan Eggermont
> Juan Vuletich
Igor Stasenko AKA sig.
More information about the Squeak-dev