Igor Stasenko wrote:
2009/11/17 Juan Vuletich juan@jvuletich.org:
Igor Stasenko wrote:
... That's where we could choose one or another line endings etc.. but not in text editor, which is a nonsense because it deals with live objects.
The editors in Squeak (in browsers, for example) deal with live objects: instances of class String. They might include any sequence of characters. Including those you don't like.
Squeak's Text editor operating with instances of Text, to be more precise. And Text instance is already far more than a String, but i think you know it yourself , so i wonder why you persist pointing me to Strings.
Because it is irrelevant to what we were discussing.
The issue we're arguing is about String <-> Text conversion, and internal representation of text in editor.
That's the issue you're arguing about now. The original discussion was whether the editor should handle or not the line ending conversions our model objects already support.
I stating, that we could completely get rid of any notion of controls characters in Text , as well as in text editors, and make implementation cleaner & leaner and free of any bizarre & cryptic character mangling. And then we could have only few places, where we should care about control chars: String <=> Text conversion and/or Stream <=> Text conversion.
Yes, that would be possible. Of course, that doesn't preclude the editor to actually support our model objects.
In Squeak, the editor is the way a developer has to interact (i.e. edit) String objects. It is not an end-user editor adapted to whatever end-user needs you have in mind.
Hmm.. i was always thinking that text editor is for editing the text, not Strings. :)
Then may be you're wrong.
Look, we write tools for users, but not for machine. Same as we should invent languages to serve for developers, not for compilers.
Dev tools are for developers. That's what the base system is about. Not about the machine, not about end-users. Just developers.
And who are the developers from text-editor point of view? Aren't they just users who need to edit a text? I barely see, where i could make use of editor which allows me to edit control chars.
I never talked about control chars. We were talking about line ending conversions. A typical scenario is needing to edit ini files for real users that are stored in a server. I need to support users with Windows and Mac. And I want to leave the files as they need them. The best way to do that is with the Cuis editor. Then, I'm in control.
During my lifetime experience as developer, i never had a need to deal with control characters in editor. I'd rather prefer to convert it before/after editing than inside an editor, or use binary editor, where i can see & change every byte.
I didn't said that we won't need to deal with line endings, but please tell me, why it should be a text editor?
I said it countless times now: Because it is the most comfortable tool to deal with String objects.
I know, that TextEditor in Squeak tries to do everything at once.. but don't you think that maybe it is time to repurpose it for only text editing, while leave rest to other tools? Lets create & use a separate tools for that. Text editor - for editing a text. String/text converter - for conversion & dealing with line endings and other idiosyncrazy.
No, I'd repurpose it only for string editing.
And then both, developers and users will be pretty happy.
Indeed.
Cheers, Juan Vuletich