As I look openssl compiling, I wonder if we should surrender to C, and just find a way to teack kids how to program in C.

If you avoid malloc, it's not even such a terrible language...

Or I'm just too old and corrupted?

@Shamar That's really one of the funniest approaches to C I have encountered 🙂

(yes, I tried to use C using various other memory management strategies than manual mallloc/free for 30 years, early motivation being 640 kB limit in real mode DOS programs, later the motivation for different programming styles changed, driven largerly by fact, the high level scripting languages automated this stuff and doing it manually in C is just too labor intensive... like building pyramids, or so...)

Because the only low level language I can really use is C (Rust looks promising, but it turns out, that without some pre-existing C++ fluency, it is not that easy to begin with), I moved from trying to find user-friendly way to write C directly (macros, typedefs, libraries, clever namespace strategies...) rather to thinking about generating C source, transpiler style. (Follow me, if you find this approach interesting... but I don't know if I am about to release anything soon...)

Follow

@xChaos

Actually C without _any_ allocation is quite simple and secure.

@Shamar yes, but the applications are also very limited. Not every application is some final state automaton you put into typical single chip microcontroller...

Almost any sofisticated application requires working with variable length strings, array or more complicated structures... standard C memory management is terrible choice for this, but I don't think we can always replace it with fixed sized buffers on stack...

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.