47 ms·
What are these "better languages" you speak of? Because I've been looking for a good C replacement but to no avail. C++, D, Nim, Go, Rust, Zig, Odin, etc; I've
by lone_haxx0r 7y ago
What are these "better languages" you speak of? Because I've been looking for a good C replacement but to no avail. C++, D, Nim, Go, Rust, Zig, Odin, etc; I've looked into them but none convinced me.
- admax88q 7y agoStop looking for another C. Move on to something really different, something dynamic like JS, Clojure, Python, or Smalltalk
- voldacar 7y agoYeah what C programmers really want is dynamic languages
- fulafel 7y agoYou can also move to a static language of course. With C's mostly absent type system, Rust or Haskell might take some getting used to. But Go could be an easy transition, or Java.
- admax88q 7y agoPeople still programming in C want C, its why they're still doing it. But you can't claim there are "no better languages" when all you're really looking for is C.
- worthless-trash 7y agoIf none of the above convinced you, you'd need to specify why each of them didn't convince you (to do what) to get a qualified answer here. Every design choice has a repercussion, specify what repercusison that you would find acceptable and then your ideal language can be defined.
- lmm 7y agoWhat were your issues with those languages? Several of them sound like reasonable options to me. For a mature, general-purpose language my default suggestion is OCaml. If you really absolutely can't make garbage collection work for your case (something I've never seen happen to anyone who actually tried) then your choices are more limited (and I'd probably favour Rust, despite its relative immaturity). There are any number of good languages out there, and I could happily go into the details of which I think offers the best combination of tradeoffs (Scala). But the bigger picture is that a memory-safe language with the ML featureset (in particular first-class functions, parametric polymorphism, type inference, and sum types) should be the minimum baseline these days, and represents a substantial step up from C (at the most basic and pervasive level, being able to do error handling with a result type vastly improves your defect rate). Within that category you have plenty of reasonable choices offering their own particular selling points.
- indymike 7y agoFor me: libraries not available or are just wrappers on a C library anyway, inflexible memory management, bad support for OS features, etc... A lot of it is just maturity. C is ancient.