News for hackers. Stuff that matters.
Re:“People who implement new and improved interfaces always ... by WalterBright on Friday September 11, 2015 @04:36PM (#10206037)
The main difficulty with strings in C is caused by arrays decaying to pointers whenever passed to a function.

My article about it:

http://digitalmars.com/articles/b44.html

Re:“People who implement new and improved interfaces always ... by joveian on Saturday September 12, 2015 @06:21PM (#10209592)
I just recently discovered that modern C actually has syntax for forcing sized arrays as function arguments. You can do:

foo(size_t n, char arr[restrict static n])

The static qualifier here means "no really, I actually want the compiler to complain if the passed array isn't the size indicated". (because C doesn't have enough different meanings for the word "static" :( ). I haven't seen this in the wild yet or checked if gcc and clang actually implement it usefully, but it seems like it could be quite useful.