top | item 33982768

(no title)

Fredej | 3 years ago

I mean, it's not that I didn't expect changes or didn't expect the language to be smaller - it's just that there definitely things that I would want to bring with me over to C. One thing I really like is RAII - that I can ensure that things are cleaned up in a known, once-defined fashion and I don't have to worry about it everywhere I use a given object. I also generally like using early returns, which is somewhat more complicated with C, as I may need to have more cleanup code around. It can be somewhat mitigated by coding more functionaly and input the necessary parameters to a function, so I can have a different function just doing allocation and deallocation. But still, it's more verbose.

`defer` would to some degree solve that issue.

Similarly, I've been missing nullptr, just for the expressiveness. I like that C23 now includes it :)

discuss

order

No comments yet.