2009-12-28

symbol.type

9.16: adda/type"symbol (includes char's and words):
. accessing arrays efficiently requires that all the items
be the same size or virtually so through dope pointers .
. one view of doc's is an arrray of line.ptr .
. if word.codes are all the same size (4 bytes)
then each word could hold not only the code, but also:
(
the size of the word's char string
,
a tag for whether this code is a word or a list (syntactic enclosure)
,
and, a tag for variants like
"( this is not a word
but a ptr to string of ascii or unicode .
)
) .
. 2 ways to structure codes to mean both spellings and definitions:
1: point to spelling and point to def';
2: point always to def, and have def point to spelling .
. each paragraph, sentence, or phrase
could have a trailer to keep odd-sized strings .
. along with being structured by lines,
a doc is also structured by a syntax.tree:
this is completely doable for prog'lang's;
and at least partially doable for natural lang .
. natural language has implicit.parenthetical containers to show syntax tree,
and while ideally you could have line.ptr's point at implicit.paren's;
sometimes the lines are better wrapped to fit the page;
so, the routine for selecting an entire line
is to traverse an index starting from one line.ptr
until the index equals the next line.ptr .

10.20: adda/type"symbol:
. obj'c's SEL.type is type symbol .
. value literals are quoted symbols .

No comments:

Post a Comment