Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED!nerds-end From: Gene Wirchenko Newsgroups: comp.compilers Subject: Re: Error-handling if your compiler had an attitude. Date: Tue, 30 Dec 2014 13:13:08 -0800 Organization: A noiseless patient Spider Lines: 104 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <14-12-013@comp.compilers> References: <14-12-010@comp.compilers> NNTP-Posting-Host: news.iecc.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit X-Trace: miucha.iecc.com 1420044479 79086 2001:470:1f07:1126:0:676f:7373:6970 (31 Dec 2014 16:47:59 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Wed, 31 Dec 2014 16:47:59 +0000 (UTC) Keywords: errors, history Posted-Date: 31 Dec 2014 11:47:59 EST X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:1456 On Mon, 29 Dec 2014 13:51:06 -0800 (PST), federation2005@netzero.com wrote: >What if your compiler had an attitude problem? I was thinking of funny things >it could do for error-handling (maybe with a -X switch for GenX/Millennial >verbose output): HA! I did something like this for an assignment in COBOL for implementing an AirMiles-type program. I had two versions of messages, one in CorpSpeak and one in smart-alecky language. For example, the trademark messages were something like: AirKloms is a trademark of BobCorp International, and we are a licenced user of the mark. AirKloms belongs to BobCorp. We are in with the man. You aren't. Go ahead, punk. Make our lawyers rich. Warning messages ended with either - Continuing or - I'll try to cope. It was great fun! The messages need not be GenX/Millennial to snark. Here are my versions: >* It addresses you like "Dude! You boffed the syntax again." or the like. "Were you a disappointment to your English teacher, too?" >* It tells you to get glasses if you keep missing semicolons [Note 1]. "Since you do not seem to like semicolons, you might try JavaScript where they are optional." >* If you use older or archaic style (particularly, deprecated stuff), it makes >fun of you and asks if you need help with your walker. [Note 2]. "It has been a while since I last compiled that type of statement. Let me check; it might be a valuable antique." >* When variables are spelled inconsistently, it recommends Sesame Street to >you for remedial assistance. "Either you have missing declarations or no dictionary." >* When you forget to include declarations for built-in stuff, it pretends it's >never heard of the function, like "what's a 'printf' and why is the 'f' >there?" "Some compilers assume that you are so stupid that they need to assume stuff for you. I prefer to think that you know better, but I am beginning to think that the other compilers may be right." >* Other undeclared externals get replies like "What? Am I supposed to figure >out what my_func is by myself?" "Mother says that I should not talk to strangers. Please introduce us." >* When there are too many errors, it may reply with "you're in way over your >head" or "are you sure you're using the right language?" "Computers are sensitive pieces of equipment. Please have your cat walk somewhere else." Mind you, C++ can do it all by itself with one error. I once forgot the parens around two calls in one statement and got over 100 error messages. The compiler stopped, because it hit the maximum. >* It may also silently rack up error counts and afterwards ask, "There are >2015 errors. Would you like to see them all? Huh? Huh?" "There were rather a lot of errors in that code. Which order would you prefer that I present the error messages in, and would you like the output bound or loose?" >* If you keep using keywords as your own variable names or other names, it >goes like "Stop that!" and threatens to delete or uninstall itself, maybe with >a menacing statement "I know where my home directory is." or "I hope you kept >backups of your installation files." "I do not think that word means what you think it means." >[I recall a few compilers a long time ago, like the 1970s, that tried >to be cute. It was amusing for about 5 minutes, then annoying. Yes, it would be quite annoying, but not quite as bad as UNIX man pages. Too many that I saw "documented" error messages with the note that they were self-explanatory. >Also see http://www.theguardian.com/technology/2014/dec/29/facebook-apologises-over-cruel-year-in-review-clips >-John] Ouch! Sincerely, Gene Wirchenko