Earlier quoted context omitted.
... and arrays that don't decay to pointers. (Which, in my opinion, is C's real million-dollar mistake, not null pointers.) Oh, and less undefined behaviors.
That's seems fixable with a standard library, if you define, typedef struct { byte *data; u64 len; } array; typedef struct { byte *data; u64 len; u64 cap; } vec; typedef struct { byte *data; u64 len; } string; etc. Then developers will adhere to those apis, so long as , one's own array-struct decays to the above, so there can be standard library fns against the above, eg., sort(array *a); etc.
Re: Shecc: A self-hosting and educational C optimizing compiler
#21Sure, but you lose the simplicity of accessing items with a[index], literals {1, 2, 3}, and initialization.