Unintended Bugs In Demonstration Code For Intential Software
from the not-a-great-start dept
Adam Barr writes “The Seattle Post-Intelligencer yesterday had a story about Charles Simonyi leaving Microsoft, and today had a follow-up about his plans for his new company. The funny part is that the second article, trying to demonstrate how a “Hello, world!” program would be written to be bug-free, has a sample of the “old” way, a C program, which has an unintended bug in it — it loops forever (those “{lcub}” and “{rcub}” in the online version of the article appeared as “{” and “}” in the printed one). Hmmm, I guess if you can’t get “Hello, world!” correct in C, maybe it is time for something new.”
Comments on “Unintended Bugs In Demonstration Code For Intential Software”
The Great American Programming Language
Good to see that even seasoned billionaires aren’t immune from the desire to implement DWIM for the rest of us, and remove the need for all those pesky programmers, SEI level-5, CASE, IDEs, James Martin, the 5th generation project, functional languages, provably correct programs, and all that nonsense.
“When someone says ‘I want a programming language in which I need only
say what I wish done,’ give him a lollipop.”
??? — CMU jokes.txt, circa 1984
just noticed the intentional
The intentional code interpreter is supposed to pick out the comment saying that the code is going to print “Hello, world!”. Unfortunately the comment is delimited wrong, */ to /* instead of the other way around. So both the intentional code example and the C example have bugs. But I guess the whiz-bang intentional code interpreter would figure that out…it’s a two step process, first figure out that the programmer *intended* to put a comment, then figure out from the comment what the code *intended* to do.
Or you could copy “Hello, world!” out of K&R, with no comments.
– adam