Hacker News new | ask | show | jobs
by shadowgovt 1600 days ago
Even the most basic ASCII string is still a data structure.

Is it a PASCAL string (length byte followed by data) or a C string (arbitrary run of bytes terminated by a null character)?

1 comments

You qualified "string" with "ASCII", and also tacitly admitted you still need more information than the octets themselves--the length.

Of course, various programming languages have primitives and concepts which they may label "string". But you still need to specify that context, drawing in the additional specification those languages provide. Plus, traditionally and in practice, such concepts often serve the function of importing or exporting unstructured data. So even in the context of a specific programming language, the label "string" is often used to elide details necessary to understanding the content and semantics of some particular chunk of data.

I think I understand the difference; you're using "string" the way I would use "blob" or "untyped byte array."

Shifting definitions to yours, I agree.