
C strings with implicit length field - rwmj
https://rwmj.wordpress.com/2016/01/08/half-baked-ideas-c-strings-with-implicit-length-field/#content
======
goalieca
Why not pascal strings? This worked for android.

{ uint Len; char str[0];}

~~~
rwmj
See the discussion here:
[https://utcc.utoronto.ca/~cks/space/blog/programming/CNullSt...](https://utcc.utoronto.ca/~cks/space/blog/programming/CNullStringsDefense)

Also why store the length twice? The whole point of my article is that malloc
already stores the length, you don't need to store it over again.

~~~
goalieca
The idea it worked for android was that you get cache locality.

