2 ms·
There are many implied choices in text editors and formats. For example, text is treated as 1.5 dimensional. Line breaks are respected and used to delimit the
by syntheweave 5y ago
There are many implied choices in text editors and formats.
For example, text is treated as 1.5 dimensional. Line breaks are respected and used to delimit the majority of the y axis span, but line wrapping(if not word wrapping) is also a standard feature. The cursor is often aware of the 2D representation and jumps through the middle of a wrapped line; more sophisticated editors include a notion of a 2D cursor mode.
These are choices. Text could be paginated to a fixed width instead, as in Forth blocks, and line endings therefore appear as another form of whitespace character, in a separation of source data from resulting output.
Alternately, we could have any number of break levels defined as characters, beyond lines, tabs, and columns - a rich set of breaks for larger constructs like paragraphs and pages, smaller ones like subscripts and superscripts, and possibly user defined ones - pushing our text format's features in the direction of something like TeX, just with a preference towards a byte encoding of each break. I've pursued that idea in a custom format. With break nesting you add opportunities for various types of lists. A careful observation of English punctuation reveals that it uses a hierarchy of break levels in this manner, with period, comma, semicolon, em-dash, etc. Yet somehow text editing has converged on line breaks and whitespace as the only relevant forms of break to natively recognize, the rest being delegated to a separate parsing stage(and programming languages themselves gravitating towards quotes and braces to nest, rather than employing more breaking characters).
Looking at Scratch, to name one well-known example, there is a genuine possibility of breaking away from text-editor tradition. It just hasn't been the focus when the tradition is being serviced so well by so many tools.