As a professor of biomedical engineering, Martin Uecker perhaps does not fit the profile of a t [...]
13 comments
A division calculation not a visible effect. Therefore the question doesn't even m ake sense: it's asking: can we see something that is not a visible effect (division) before or after a visible effect (modification of a volatile object).
Compilers already understand this: For example, they would not hoist a potentially trapping operation such as a division above a function call. The issue is that they did not apply this rule also to volatile accesses, but LLVM now does because this was fixed.
Also, something for RAII, so that one could automatically deallocate allocated memory.
Also:
- for ‘generics’: X macros (https://en.wikipedia.org/wiki/X_macro, if desired in combination with _Generic (https://en.cppreference.com/c/language/generic), or use C++, if desired with linting that rejects use of some features.
- for RAII: I think ‘defer’ is in the pipeline. Not quite the same, but useful anyways. gcc and clang already support it (with not-so-nice syntax; see https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Common-Variable..., look for cleanup)
How did we ever get here??
As a user that's so outrageous it must be a deliberate conspiracy against C. I'm sure it isn't but it certainly helps it's demise, as the feeling the tool is in the hands of imbeciles that mistake the trees for he forest. C now requires you to be an expert on undefined behavior, and the psychology regarding the matter, while previously C would be forgiving.
So I thought the article would be about --forgive --generous, or --embedded while there should have been --petty in the first place.
Read the full thread on Hacker News →
Related stories
- Hacker News · 1 points · 2 days ago
- Lobsters · 79 points · 2 months ago
- Lobsters · 5 points · over 8 years ago
- Patrick Boyle: The Copy-Paste Professoryoutube.comHacker News · 8 points · 6 days ago
- Hacker News · 5 points · 9 days ago
- Hacker News · 2 points · 8 days ago