Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!oddjob!gargoyle!ihnp4!inuxc!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.UUCP (Rahul Dhesi) Newsgroups: comp.lang.c Subject: The Principle of Most Astonishment Message-ID: <996@bsu-cs.UUCP> Date: Wed, 19-Aug-87 11:30:55 EDT Article-I.D.: bsu-cs.996 Posted: Wed Aug 19 11:30:55 1987 Date-Received: Sat, 22-Aug-87 02:47:28 EDT Reply-To: dhesi@bsu-cs.UUCP (Rahul Dhesi) Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 26 Summary: VMS C In article <14039@topaz.rutgers.edu> ron@topaz.rutgers.edu (Ron Natalie) writes: [continuing a discussion about reasonable defaults] >The default action for the compiler should be to ACT NORMALLY. ACTING >NORMALLY means complying with whatever standards might be there. The VAX/VMS C compiler gives you a choice of warning you against non- portable constructs or accepting them silently. The command-line switch used for this is /STANDARD, and optionally you can add the string =NO or =YES after it. The fun part is this. If you invoke it as CC it accepts non-portable constructs silently. If you invoke it as CC /STANDARD it still accepts non-portable constructs silently. The compiler assumes that users who type /STANDARD really meant /STANDARD=NO. This is the Principle of Most Astonishment at its best. Consider its potential universal application. If you typed LOGOUT, you really meant LOGOUT=NO, so you stay logged in...Experienced users might tear out their hair, but it would greatly help novice users who often log out accidentally. :-) -- Rahul Dhesi UUCP: {ihnp4,seismo}!{iuvax,pur-ee}!bsu-cs!dhesi