home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!munnari.oz.au!sol.deakin.OZ.AU!news.cs.uow.edu.au!cssc-syd.tansu.com.au!pete
- From: pete@cssc-syd.tansu.com.au (Peter Alexander Merel)
- Subject: Re: Proposal - enhancement for switch statement.
- Message-ID: <1992Nov19.211040.20033@cssc-syd.tansu.com.au>
- Organization: AOTC - CSSC
- References: <1992Nov15.190830.11622@cssc-syd.tansu.com.au> <1992Nov16.150331.11996@ucc.su.OZ.AU>
- Date: Thu, 19 Nov 1992 21:10:40 GMT
- Lines: 25
-
- maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
- >
- >[the lecture on switch vs. virtuals I'd hoped to avoid]
- >
- >[an example of an if statement ... gee, thanks :-)]
- >
- >Pascal did the switch better.
-
- I can't agree with this completely. I like being able to fall through
- through cases; it's a clumsy way to do disjunction, I admit, but it's
- got an explicit order dependence that you don't get any other way. I
- don't use that much (ever?) but I like knowing it's out there, somewhere.
-
- > Doubt it. How about case 1..10: ?? Any chance? Probably not.
-
- Certainly not. The advantage I'm trying to get is to be able to use
- a switch on types that don't go onto int. You can already use such
- types in conditional expressions inside whiles, ifs and fors, by
- virtue of operator==. I just don't see why switch should be left out in
- the cold like this; I suspect it's a bit of polymorphism envy from Bjarne.
-
- --
- Internet: pete@cssc-syd.tansu.com.au UUCP: {uunet,mcvax}!munnari!cssc-syd!pete
- Snail: 1/18-20 Orion Road, Lane Cove NSW 2066 Australia Phone: +61 2 911 3130
- I am a big pond in a small fish.
-