logoalt Hacker News

Joker_vDtoday at 4:24 AM1 replyview on HN

Yeah, I too feel that storing the array's length glued to the array's data is not that good of an idea, it should be stored next to the pointer to the array aka in the array view. But the thrall of having to pass around only a single pointer is quite a strong one.


Replies

kstrausertoday at 5:07 AM

Is there a reason for the string not to be a struct, so that you're still just passing around a pointer to that struct (or even just passing it by value)?

show 1 reply