←back to thread

93 points endorphine | 1 comments | | HN request time: 0.252s | source
Show context
gavinhoward ◴[] No.43537632[source]
As a pure C programmer [1], let me post my full agreement: https://gavinhoward.com/2023/08/the-scourge-of-00ub/ .

[1]: https://gavinhoward.com/2023/02/why-i-use-c-when-i-believe-i...

replies(1): >>43539291 #
muldvarp ◴[] No.43539291[source]
To quote your article:

> The question is: should compiler authors be able to do whatever they want? I argue that they should not.

My question is: I see so many C programmers bemoaning the fact that modern compilers exploit undefined behavior to the fullest extent. I almost never see those programmers actually writing a "reasonable"/"friendly"/"boring" C compiler. Why is no one willing to put their ~money~ time where their mouth is?

replies(2): >>43540135 #>>43540589 #
gavinhoward ◴[] No.43540589[source]
I was willing to, but the consensus was that people wouldn't use it.

C and C++ programmers complain about UB, but they don't really care.

TCC is probably the closest thing we have to that, and for me personally, I made all of my stuff build on it. I even did extra work to add a C99 (instead of C11) mode to make TCC work.

replies(1): >>43543146 #
muldvarp ◴[] No.43543146[source]
Shouldn't your blog post then condemn the C community at large for failing to use a more "reasonable" C compiler instead of complaining about compiler authors that "despite holding the minority world view, [...] have managed to force it on us by fiat because we have to use their compilers"?

You don't have to use their compilers. Most people do, because they either share this "minority" world view or don't care.

replies(1): >>43549117 #
1. gavinhoward ◴[] No.43549117[source]
My blog post doesn't condemn the C community at large because it was the HN comments on that post where I found out that the C community is a bunch of hypocrites.