The forked elephant in the room

Walter Bright newshound2 at digitalmars.com
Mon Jan 29 00:43:51 UTC 2024


On 1/28/2024 1:24 PM, matheus wrote:
> Walter I have a question regarding C, I remember that in the past you wrote a 
> paper about a solution for the C Arrays, which would be something like storing 
> its size in the first address and increment it to be used, and time you want the 
> array size it would do something like:
>   *(p-1) == size.
> 
> Could you please share that paper again?

I'm sorry, I don't recall writing such a paper. They're called length-prefixed 
strings, which are useful for some cases but not in the general case because 
they don't support slicing.

I did write a paper about adding D arrays to C:

https://www.digitalmars.com/articles/C-biggest-mistake.html


More information about the Digitalmars-d mailing list