In case anyone doesn't know, this is actually what Pascal and other "Wirth languages" do. The underlying representation of a string in memory has the length stored before the string data.
Afaik AmigaOS itself was based on some earlier OS written in B or BCPL language.
PS: Here's some story behind this http://aminet.net/package/dev/misc/BCPL