Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I used to love C for its simplicity. There was just no surprises, and the limited feature set enforced a certain programming style that also happens to run very well on modern CPUs.

But the C standard library is just awful. It's so inconsistent and full of quirks you just have to know. Like how some string functions allow you to specify a size, while others don't. And how strtok keeps track of an internal state and behaves differently on subsequent calls.

I wish there was a language that as simple and limited as C, but with modern (and portable) functions for things like strings, networking, graphics and so on.



> But the C standard library is just awful.

This is very painfully true, but one 'killer feature' of C is that it is useful without ever using stdlib functions (except basics like memset, memcpy, ... which can be considered compiler builtins anyway).

In more recent languages (even C++) there is no such clear distinction between the language and stdlib any more, which IMHO is a real problem (e.g. most of C++'s problems are actually stdlib problems, not language problems).


Because it was designed with UNIX API surface in mind, and also the reason why outside embedded and Windows everyone with a C compiler does POSIX, even crufty mainframes that are still being sold.


It is as much the case that modern cpus have been designed to facilitate c semantics. C was designed for the cpu initially, but a lot of generations have happened since then, and there have been attempts to try other things, and by now the cpu is designed for c to run well on it.


check out hare-lang.org (still wip, but quite good already)




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

Search: