Hacker News new | ask | show | jobs
by teo_zero 410 days ago
> "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?

1 comments

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).