News for hackers. Stuff that matters.
Re:Odin, a Pragmatic C Alternative with a Go Flavour by teo_zero on Saturday May 10, 2025 @01:56AM (#43943509)
> "Better-C" still has things many C-programmers wouldn't particularly like

I'd say a couple, not many.

> RAII

Who wouldn't like RAII?

> Metaprogramming

As a way to avoid preprocessor macros? Yes please.

> Nested functions

Already offered as extension.

> Member functions

I'm sure no C programmer would object to that.

> constructors, destructors

This yes. Agreed.

> operating overloading

Instead of _Generic()? Why not?

Re:Odin, a Pragmatic C Alternative with a Go Flavour by gingerBill on Saturday May 10, 2025 @05:15AM (#43944291)
I wouldn't like RAII, and why I didn't add it to Odin. It's not a feature C programmers want. And you've just agreed that C don't want ctors/dtors, which is necessary for RAII to work... ctors/dtors are bad for their own reasons (mainly because you cannot handle error cases except through exceptions, which many people disable too).