Re:C’s Biggest Mistake
by pornel on Sunday July 02, 2023 @08:16PM
(#36567207)
There's C99 `arr[static size]` function argument syntax, but it's still not a proper slice type. Compilers may warn about incorrect direct uses of such argument (although last time I checked they don't), but it still decays to a pointer. You can't use this as a type of a variable or a struct field. There's no way to make subslices (safe pointer arithmetic) without losing the arrayness argument magic, etc.
[ Parent
| on HN ]
There are no comments on this comment yet.