Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #72804
| From | James Kuyper <jameskuyper@alumni.caltech.edu> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: Help needed |
| Date | 2020-04-04 10:27 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <r6a5ft$l24$1@dont-email.me> (permalink) |
| References | (2 earlier) <slrnr8eu8f.e3c.nedlatham@woden.valhalla.oz> <slrnr8f5nu.1r7q.grahn+nntp@frailea.sa.invalid> <slrnr8fcd2.eb4.nedlatham@woden.valhalla.oz> <r691l0$idd$1@dont-email.me> <slrnr8g4vd.ep1.nedlatham@woden.valhalla.oz> |
On 4/4/20 12:58 AM, Ned Latham wrote: > James Kuyper wrote: >> Ned Latham wrote: ... >>> Exception throwing: once an option, now the default. >>> "namespace": once an option, now a requirement. >> >> Could you identify the specific changes in the text of the standard that >> you're referring to, and when they happened? > > No. I don't geek around with committee standards. The only C++ standard > that I know is Stroustrup's: "Programming in C++", vol 3, 1997. > > Exception throwing was optional back then, which suits me fine, because > one of my projects is a library, and that is no place for exceptions > (frankly, I think they encourage sloppy programming, and I eschew them > at all times, not just in libraries). At some point, which I haven't > reached yet, it became the default. When I reach that point, I'll be > dropping back to the previous compiler. > > Namespace wasn't on the curriculum when I started learning C++. > I don't know when it was introduced, but in his book (vol 3) Stroustrup > seems to imply that it's a new thing. He discusses, for example, > "transitioning" to it. Now, it seems, its use is compulsory. > > I will not tolerate that either. What's with you? I only asked for a simple explanation for an obscure comment. OK, so you've made it clear that you're complaining about something you know little about. That's fine - I'd feared that you were describing some recent changes to the language that I hadn't noticed (Unfortunately, for me, "recent" could include changes dating as far back to C++2017). Throwing exceptions and declaring namespaces remains optional, and are not the default. Your function will throw exceptions only if it explicitly uses throw(), or if it calls a subroutine that uses throw() outside of a try-block - that's the same as it has always been. Everything in the C++ standard library that can be declared inside a namespace is so declared, and many routines in the standard library do throw exceptions. Both of those statements have been true since shortly after those features were added to the language. However, your own code doesn't have to throw exceptions, use namespaces, or use the C++ standard library. ... > I'd rather put that learning curve into designing and implementing > a well-thought-out language. Then I would recommend not bothering to monitor a newsgroup devoted to a language that you hate. ... >>> the defective post-increment semenatic of C++. >> >> Could you identify what you consider to be defective about C++'s >> post-increment semantic? > > It doesn't work with non-native types. It works with any user-defined type that defines an operator overload for that operator, or can be implicitly converted to a type for which it's permitted. > Post-decrement too, of course. That's not "of course" - the fact that you explicitly specified "post-increment" implies that your complaint is specifically about that operator. Based upon the reason you've given, I'm surprised that you're not complaining equally strongly about all of the other arithmetic operators. You can't apply any of the following operators to a user-defined type: + - ! ^= &= <= >= [] * < |= && / > << || % += >> ^ -= >>= -- & *= <<= | /= == ->* ~ %= != Unless, of course, an applicable operator overload is defined or there's conversion operators or conversion constructors defined that will convert a value of that type to a different type for which those operators are permitted. Note: in that list, "&" refers to the binary operator - unary & can, of course, be applied to any object of any type.
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Help needed Gerry Wolff <gerrywolff65@gmail.com> - 2020-04-03 09:56 -0700
Re: Help needed Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk> - 2020-04-03 18:18 +0100
Re: Help needed Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-03 12:57 -0500
Re: Help needed Melzzzzz <Melzzzzz@zzzzz.com> - 2020-04-03 18:17 +0000
Re: Help needed Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-03 16:41 -0500
Re: Help needed James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-04-03 14:58 -0400
Re: Help needed Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-03 16:45 -0500
Re: Help needed Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-03 17:52 -0500
Re: Help needed Jorgen Grahn <grahn+nntp@snipabacken.se> - 2020-04-03 20:05 +0000
Re: Help needed Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-03 16:58 -0500
Re: Help needed Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-03 17:50 -0500
Re: Help needed James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-04-04 00:15 -0400
Re: Help needed Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-03 23:58 -0500
Re: Help needed Ian Collins <ian-news@hotmail.com> - 2020-04-04 18:06 +1300
Re: Help needed Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-04 00:35 -0500
Re: Help needed Ian Collins <ian-news@hotmail.com> - 2020-04-04 19:54 +1300
Re: Help needed Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-04 02:22 -0500
Re: Help needed Bo Persson <bo@bo-persson.se> - 2020-04-04 10:33 +0200
Re: Help needed Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-04 04:55 -0500
Re: Help needed David Brown <david.brown@hesbynett.no> - 2020-04-04 13:02 +0200
Re: Help needed Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-04 07:15 -0500
Re: Help needed David Brown <david.brown@hesbynett.no> - 2020-04-04 16:49 +0200
Re: Help needed Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-05 04:10 -0500
Re: Help needed Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk> - 2020-04-05 16:31 +0100
Re: Help needed Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-05 11:37 -0500
Re: Help needed Bonita Montero <Bonita.Montero@gmail.com> - 2020-04-04 14:19 +0200
Re: Help needed David Brown <david.brown@hesbynett.no> - 2020-04-04 16:57 +0200
Re: Help needed James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-04-04 10:51 -0400
Re: Help needed James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-04-04 10:44 -0400
Re: Help needed Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-05 04:06 -0500
Re: Help needed James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-04-05 11:04 -0400
Re: Help needed Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-05 11:31 -0500
Re: Help needed James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-04-05 16:59 -0400
Re: Help needed Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-05 21:38 -0500
Re: Help needed "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2020-04-04 13:51 +0200
Re: Help needed Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-04 08:33 -0500
Re: Help needed Ian Collins <ian-news@hotmail.com> - 2020-04-05 07:35 +1200
Re: Help needed Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-05 04:19 -0500
Re: Help needed James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-04-05 11:27 -0400
Re: Help needed James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-04-04 22:27 -0400
Re: Help needed Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk> - 2020-04-04 14:50 +0100
Re: Help needed James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-04-04 10:27 -0400
Re: Help needed Ian Collins <ian-news@hotmail.com> - 2020-04-05 07:37 +1200
Re: Help needed Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-05 03:45 -0500
Re: Help needed Paavo Helde <myfirstname@osa.pri.ee> - 2020-04-04 09:02 +0300
Re: Help needed Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-04 01:20 -0500
Re: Help needed Ian Collins <ian-news@hotmail.com> - 2020-04-04 19:43 +1300
Re: Help needed Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-04 02:10 -0500
Re: Help needed Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-04-04 01:58 -0700
Re: Help needed Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-04 05:04 -0500
Re: Help needed Paavo Helde <myfirstname@osa.pri.ee> - 2020-04-04 14:37 +0300
Re: Help needed Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-04 07:25 -0500
Re: Help needed Paavo Helde <eesnimi@osa.pri.ee> - 2020-04-04 17:39 +0300
Re: Help needed Ned Latham <nedlatham@woden.valhalla.oz> - 2020-04-05 04:02 -0500
Re: Help needed Bonita Montero <Bonita.Montero@gmail.com> - 2020-04-03 19:35 +0200
Re: Help needed Bonita Montero <Bonita.Montero@gmail.com> - 2020-04-03 20:01 +0200
Re: Help needed Bonita Montero <Bonita.Montero@gmail.com> - 2020-04-04 16:16 +0200
Re: Help needed Bonita Montero <Bonita.Montero@gmail.com> - 2020-04-04 18:58 +0200
Re: Help needed Christian Gollwitzer <auriocus@gmx.de> - 2020-04-03 22:01 +0200
Re: Help needed Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk> - 2020-04-03 21:05 +0100
Re: Help needed Bo Persson <bo@bo-persson.se> - 2020-04-04 02:10 +0200
Re: Help needed Jorgen Grahn <grahn+nntp@snipabacken.se> - 2020-04-04 08:19 +0000
Re: Help needed Gerry Wolff <gerrywolff65@gmail.com> - 2020-04-05 02:56 -0700
Re: Help needed Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-04-04 01:14 +0100
Re: Help needed Gerry Wolff <gerrywolff65@gmail.com> - 2020-04-05 02:49 -0700
Re: Help needed Sam <sam@email-scan.com> - 2020-04-04 16:30 -0400
Re: Help needed Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk> - 2020-04-05 05:58 +0100
Re: Help needed Gerry Wolff <gerrywolff65@gmail.com> - 2020-04-05 03:21 -0700
Re: Help needed Juha Nieminen <nospam@thanks.invalid> - 2020-04-07 06:33 +0000
Re: Help needed Jorgen Grahn <grahn+nntp@snipabacken.se> - 2020-04-07 10:39 +0000
csiph-web