From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_05,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Xref: utzoo comp.software-eng:3111 comp.lang.ada:3406 comp.lang.c:26693 comp.lang.lisp:2885 comp.lang.misc:4370 comp.lang.modula2:2156 comp.lang.pascal:3199 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rutgers!aramis.rutgers.edu!atanasoff.rutgers.edu!lou From: lou@atanasoff.rutgers.edu (Lou Steinberg) Newsgroups: comp.software-eng,comp.lang.ada,comp.lang.c,comp.lang.lisp,comp.lang.misc,comp.lang.modula2,comp.lang.pascal Subject: Re: problems/risks due to programming language, stories requested Message-ID: Date: 8 Mar 90 15:19:51 GMT References: <1004@micropen> <8218@hubcap.clemson.edu> <2596@gmu90x.gmu.edu> Organization: Rutgers Univ., New Brunswick, N.J. Cc: lou List-Id: In article <2596@gmu90x.gmu.edu> jbaker@gmu90x.gmu.edu (jbaker) writes: > In article <8218@hubcap.clemson.edu> Bill Wolf writes: > >From dave@micropen (David F. Carlson): > >> A multi-case switch is very handy in many situations to reduce identical > >> treatments for similar cases. > > But the real usefulness of requiring break in a switch statement is for > SIMILAR treatments of similar cases, for example you may require a > few assignments in one case before a more complicated computation which > must be performed for several of the cases. ARGHHH!! That is what subroutines (and macros) are for - to handle common code. And if your language makes them too expensive, either in terms of run time or in terms of programmer effort, then THAT is an even worse problem with the language than the problems with break. -- Lou Steinberg uucp: {pretty much any major site}!rutgers!aramis.rutgers.edu!lou arpa: lou@cs.rutgers.edu