Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is it better to pass the length of the array, or a pointer to the last valid address in the array? (or one past that) There's probably an advantage in the two types being the same.

Thought of this as I was reading the article.



The length is better, since that's almost always what you want.

> There's probably an advantage in the two types being the same.

Not really.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: