← Back to context

Comment by uecker

1 month ago

I wonder about what you think is wrong with C? C is essentially a much simplified subset of ALGOL68. So what is missing in C?

Proper strings and arrays for starters, instead of being pointers that the programmer is responsible for doing length housekeeping.

  • Arrays are not pointers and if you do not let them decay to one, they do preserve the length information.

    • They surely behave like one as soon as they leave local scope.

      Kind of hard when passing them around as funcion parameters, and the static trick doesn't really work in a portable way.

      Lets seen how far WG14 gets with cybersecurity laws with this kind of answers being analysed by SecDevOps and Infosec experts.

      4 replies →

I think what C is missing is everything that people fall back onto clever use of pointers and macros to implement. Not that I think C should have all those things, Zig does a decent job of showing alternatives.

  • Yeah, but I meant specifically from ALGOL68.

    • I don't think C is missing anything from Algol 68, but, FLEX and slices would be nice, although Algol's slices are fairly limited but even its limited slices are better than what C offers. Algol 68 operators are amazing but I don't see them playing well with C.