6 ms·
This is one reason I wonder whether there is room in the world for a better C. Low complexity programming languages with a simple machine mental model along the
by stallmanifold 8y ago
This is one reason I wonder whether there is room in the world for a better C. Low complexity programming languages with a simple machine mental model along the lines of Go (or perhaps in future, Zig and Jai?) for doing systems programming, with a strong static type system, and a rock solid build system. Early in my career I did a lot of bare metal and embedded systems programming and the one thing I miss about C is the predictable assembly output. I primarily use Rust for this purpose right now but I wonder if there's a place for something simpler for doing really low level stuff (i.e. programming hardware directly, device drivers) that's better than C.
EDIT: grammar.
- AndyKelley 8y ago> I wonder if there's a place for something simpler for doing really low level stuff (i.e. programming hardware directly, device drivers) that's better than C. Like this? https://andrewkelley.me/post/zig-stack-traces-kernel-panic-bare-bones-os.html https://andrewkelley.me/post/zig-stack-traces-kernel-panic-b...
- christophilus 8y agoI like Zig. Have you tried it? I’d be interested in hearing about your experience. I haven’t been able to think of a project to use it for, though, as all of my work these days is web related.
- dinglejungle 8y ago(you replied to the creator of Zig, fyi)
- deleted 8y ago[deleted]
- christophilus 8y agofacepalm I need to start looking at usernames before replying!
- pjmlp 8y agoModula-2 comes to my mind. :)
- ams6110 8y agoYep. Languages I used in school included Pascal, Modula-2, Scheme, and of course C. Fond memories. Everything seemed simple then.
- esfandia 8y agoMaybe a cleaned-up Pascal would do the trick? It was a great teaching language back when I was a student. Low complexity, strong static typing, compiled language, no GC, pretty fast. No pointer arithmetic, harder to shoot oneself in the foot, but still easy access to pointers and easy ability to manage memory. edit: What I meant by "cleaned-up" Pascal was addressing some of Kernighan's criticisms as seen in https://www.lysator.liu.se/c/bwk-on-pascal.html https://www.lysator.liu.se/c/bwk-on-pascal.html (also, the Pascal syntax is a bit bloated)
- zoom6628 8y agoFreepascal pretty much is the cleaned up version you describe. Fast, free, multiplatform, and just plain sensible. Overdue for a resurgence of use. Maybe the foundation in charge could rename it Cpascal and it would suddenly lift in popularity. Pascal was a language I learnt in 1982 and love it for its elegance. The only thing i dislike and is still around its the begin... End and only because I'm a lazy typist and lazy reader.For me is hard to find Begin-end blocks... Harder than looking for stupid squiggles used in other languages. Go figure.
- augustk 8y agoCheck out Oberon which is the current Pascal. I use the OBNC compiler (https://www.miasap.se/obnc https://www.miasap.se/obnc).
- pvitz 8y agoThe Oberon specification on this website is also a great and concise read: https://www.miasap.se/obnc/oberon-report.html https://www.miasap.se/obnc/oberon-report.html