Re: Why are byte ports "ports" as such? Per Bothner 23 May 2006 21:37 UTC

Thomas Bushnell BSG wrote:
> Per Bothner <> writes:
>> You're contradicting yourself: I asked about a use-case for *character*
>> as a separate *data type*.
> Text editors.

You need keyboard *events*, for input, but they're obviously quite
different from characters.  (They have modifier bits, plus maybe
separate up/down events.)

You need to store and modify text data in *buffers*, but there is no
need for characters as a separate data type.  You do need functions to
"move to the next character/word/line/paragraph", but again these work
in characters in a buffer, not individual characters.

You need be able to display the text, which involves searching for
glyphs in fonts, possibly performing kerning, line-breaking, etc.
Again, a character data type will probably be either too high-level
or too low-level. You certainly don't want to have it built-in to
your programming language, but into your display software.
	--Per Bothner