A Defer Mechanism for C
gustedt.wordpress.com
A Defer Mechanism for C
1–10 of 248 posts
Re: A Defer Mechanism for C
#2One of the key interest of C compared to more recent languages is that everything is explicit. With a finger you can follow the code as it runs and know exactly what is going on and when exactly.
At the opposite, there is c++ that does a lot of things automagically. And it is often hard to understand why you suddenly get a segfault out of blue, just because a destructor was randomly called at the wrong time.
Re: A Defer Mechanism for C
#3Re: A Defer Mechanism for C
#4Re: A Defer Mechanism for C
#5Good to see it standardized of course...
Re: A Defer Mechanism for C
#6Despite being convenient,I have the feeling that it might be a bad idea. One of the key interest of C compared to more recent languages is that everything is explicit. With a finger you can follow the code as it runs and know exactly what is going on and when exactly. At the opposite, there is c++ that does a lot of things automagically. And it is often hard to understand why you suddenly get a segfault out of blue,…
There's nothing implicit about defer.
Re: A Defer Mechanism for C
#7Re: A Defer Mechanism for C
#8Or you know... free the things you need to free and move on with your life
Re: A Defer Mechanism for C
#9Despite being convenient,I have the feeling that it might be a bad idea. One of the key interest of C compared to more recent languages is that everything is explicit. With a finger you can follow the code as it runs and know exactly what is going on and when exactly. At the opposite, there is c++ that does a lot of things automagically. And it is often hard to understand why you suddenly get a segfault out of blue,…
Re: A Defer Mechanism for C
#10I’ve always considered “defer” an inelegant kludge in comparison to RAII for automatic cleanup of resources. It’s surprising that the C standards committee is considering adding that to the language. Then again, nearly none of the syntactic C features post-C89 have been very compelling or widely adopted.