3 ms·
I appreciate the work put into typesetting the C code. It makes the examples look quite elegant. EDIT: Having finished reading, I do prefer compilers being str
by shadowofneptune 4y ago
I appreciate the work put into typesetting the C code. It makes the examples look quite elegant.
EDIT: Having finished reading, I do prefer compilers being straightforward to being clever. The Go compiler is one example of a compiler which follows this school, Pascal and Delphi are as well.
- yababa_y 4y agowhat would the go compiler have to do differently to transcend from straightforward to clever?
- shadowofneptune 4y agoThe article takes aim at Fortran compilers—the desire for fast numeric code is one thing that drives complexity of compilation. Another thing is what you see in comments on the Go compiler: https://news.ycombinator.com/item?id=30045015 https://news.ycombinator.com/item?id=30045015 People expect the Go compiler to compete with LLVM in code quality, when the philosophies are quite different. It prefers compilation speed to code quality when it has to choose, while LLVM prefers the opposite. Delphi, all the Pascal compilers I know of, and the Portable C Compiler are similar to Go in approach.
- yababa_y 4y agoWhere is that in the essay? It’s almost entirely not about compilation. I am still a bit confused about your original comment, the reason I asked for clarification was to see how it relates to the points the essay makes, and I still don’t see it. The main points the essay makes about compilation is that undefined behavior was accidental and contrary to the most honest view of C (obviously, the one the author has). And then the complexity comes not from the compiler’s procedures for optimizing code, but rather the inane language semantics the committee has adopted, that permits them to be lenient with how they map C. I suspect the ocaml compiler qualifies for your usage, to add a much different language to your corpus.
- shadowofneptune 4y ago> If anything, extreme attention to performance comes from the opposite [of systems programming]: attempts to generalise C towards specific application domains, particularly numerical applications. Linus Torvalds, no stranger to systems programming, is a persistent critic of language standards bodies and compiler implementers for pursuing small performance improvements at the expense of predictability and debuggability—as he expounded in characteristically direct style in a cross-mailing-list exchange in February 2016. >> ...the original C designers were better at their job than a gaggle of standards people who were making bad crap up to make some Fortran-style programs go faster. > These issues come down to the interpretation of undefined behaviour in C—to which I will return briefly in §7. I found the article does go into compilation quite a bit in that section. It ends by calling for changing the language as it is implemented, not as it is written. Yes, OCaml would fit. Functional languages have invented a lot of interesting techniques to run performantly.