This preprint from TU Delft and ETH Zurich generates small programs from
the grammars of several popular programs, and calculates CQ, which is
roughly the percentage (0-100) that compile, intended as a proxy for how
hard the languages are to write. C has a CQ of 48, Rust barely above
zero.
[I had two other thoughts. One was that you can tell C was written when parsing was still hard enough that you didn't want to bulk the parsers
up with semantic stuff. The other was that in the languages where it is
hard to write a valid problem, how much more likely is it that the program actually works once you get it to compile? -John]
[I had two other thoughts. One was that you can tell C was written when >parsing was still hard enough that you didn't want to bulk the parsers
up with semantic stuff.
The other was that in the languages where it is
hard to write a valid program, how much more likely is it that the program >actually works once you get it to compile? -John]
C has a CQ of 48, Rust barely above zero.
In the discussion at the end they say "A programmer's task is to
write programs that compile." which I think summarizes the basic
problem with the paper. Take a look.
The other was that in the languages where it is
hard to write a valid program, how much more likely is it that the program >> actually works once you get it to compile? -John]
That is the promise of programming langauges that make it hard to get
a program to compile: get it to compile, and it is usually correct. I
am not aware of any empirical evidence that supports this promise.
generates small programs fromI think that the *syntactic grammar* of program *languages* is meant:
the grammars of several popular programs,
The key idea is to measure the compilation success rates of programs
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 59 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 19:24:28 |
| Calls: | 810 |
| Calls today: | 1 |
| Files: | 1,287 |
| D/L today: |
10 files (21,017K bytes) |
| Messages: | 193,978 |