dkg / draft-rivest-sexp

0 stars 0 forks source link

list-structure memory representation is unclear about difference between "simple strings" and "strings" #11

Open dkg opened 11 months ago

dkg commented 11 months ago

In the in-memory representations section, the List-structure memory representation says:

Here there are separate records for simple-strings, strings, and lists. An S-expression of the form ("abc" "de") would require two records for the simple strings, two for the strings, and two for the list elements. This is a fairly conventional representation, and details are omitted here.

While it might be conventional, it's not a convention i'm aware of, and i don't understand it. is "simple-string" different from "simple string" ? how does either one of those differ from "string"?

The ABNF appears to suggest that a simple-string is a string without the optional square-bracket-enclosed display-hint. but then a simple-string is in fact a string anyway.

The "array-layout" memory representation section distinguishes between "octet-string" and "octet-string with display-hint" -- are those analogous to "simple-string" and "string", respectively?

What would the six records be in the example given?

d3e3e3 commented 3 months ago

I'll change "simple string" to be hyphenated and provide ascii art for the example.

d3e3e3 commented 3 months ago

The ascii art example just lead to more questions. I've added a reference and a bit of text o help explain this.

A string might be represented as a sort of special kind of list of two element where the first is nil or a pointer to the display-hint.