Hacker News new | comments | show | ask | jobs | submit login

This is why C is sort of unassuming in its "sizeof arr / sizeof *arr" pattern.

Whenever you write a new type, just write a sizing function for it using sizeof. I like that Go is taking a similar route, except that one just implements the signature.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: