25 ms·
> 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 co
by chrisseaton 10y ago
> 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?
- Animats 10y agoThat'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 http://www.imperial.ac.uk/pls/portallive/docs/1/18619746.PDF