Hacker News new | past | comments | ask | show | jobs | submit login

> I love C.

You and me both. I'm also a polygot but I originally started on interpreted languages like PHP and Python. I then learned some C, which was quite frustrating before I learned how to reason about memory ownership and hold myself to some idioms. Oh and Valgrind.

I then rewrote a bunch of projects in Rust and while it lead to correct and working software, it didn't spark the joy that C did for me. I don't exactly know why and at times I almost feel ashamed to mention this. I do hope there's a future where there's a version of C with some more substantial changes/improvements though, perhaps taking a lesson or two from Rust or Zig (eg string type w/ length).




Since D is already taken, maybe a language called "E"?

The first thing I'd borrow from Rust are Option and Result for better error handling.


Yes, this, most modern languages embrace this idea of Optional. I believe OCaml might have invented it (I love OCaml too!). Odin has it I think, Rust obviously, and Swift heavily as well.

What's interesting, modern C, is promoting this move as well. Don't just return an integer, return a struct result_t with a fail bool or error bool in it, as opposed to some const char* pointing to null. Do this more and more and your C code starts becoming a lot more digestible and modern (although common sense still applies to not go overboard with these constructs in C, but you can set up a nice contract type API design within your code base).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: