Re:Checked C: extension to C that adds static and dynamic ch...
by timClicks on Wednesday March 14, 2018 @11:28PM
(#16590228)
So in a sense implementing Pascal strings in C?
[ Parent
| on HN ]
Re:Checked C: extension to C that adds static and dynamic ch...
by flukus on Thursday March 15, 2018 @02:25AM
(#16590804)
Yes. But also "abusing" C's permissiveness with pointers to get pascal strings that interop with standard functions. It get's passed around as a pointer to a char array but the length function would return the value at that pointer - sizeof(size_T). In most languages this wouldn't be possible.