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

> The fundamental problem with arrays in C is that compiler has no idea how big they are

Isn't that the compiler's choice, to not know how big they are? You could write a standards compliant implementation of C that did track how big arrays were if you wanted to couldn't you?



That's been done, with "fat pointers". GCC used to have an option for that, but it wasn't used much. The overhead is all at run time and is substantial.[1]

[1] http://www.imperial.ac.uk/pls/portallive/docs/1/18619746.PDF




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

Search: