Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #72763 > unrolled thread
| Started by | Gerry Wolff <gerrywolff65@gmail.com> |
|---|---|
| First post | 2020-04-03 09:56 -0700 |
| Last post | 2020-04-07 10:39 +0000 |
| Articles | 20 on this page of 70 — 18 participants |
Back to article view | Back to comp.lang.c++
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
Page 3 of 4 — ← Prev page 1 2 [3] 4 Next page →
| From | Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk> |
|---|---|
| Date | 2020-04-04 14:50 +0100 |
| Message-ID | <5h0iG.4$oO.0@fx38.ams1> |
| In reply to | #72797 |
On 04/04/2020 12:51, Alf P. Steinbach wrote: [snipped] > using namespace std; // Do this to get roughly pre-standard behavior. No, just no. /Flibble -- "Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin “You won’t burn in hell. But be nice anyway.” – Ricky Gervais “I see Atheists are fighting and killing each other again, over who doesn’t believe in any God the most. Oh, no..wait.. that never happens.” – Ricky Gervais "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Byrne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say."
[toc] | [prev] | [next] | [standalone]
| From | James Kuyper <jameskuyper@alumni.caltech.edu> |
|---|---|
| Date | 2020-04-04 10:27 -0400 |
| Message-ID | <r6a5ft$l24$1@dont-email.me> |
| In reply to | #72781 |
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.
[toc] | [prev] | [next] | [standalone]
| From | Ian Collins <ian-news@hotmail.com> |
|---|---|
| Date | 2020-04-05 07:37 +1200 |
| Message-ID | <hes5uuFfrroU5@mid.individual.net> |
| In reply to | #72804 |
On 05/04/2020 02:27, James Kuyper wrote: > 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? It's called trolling :) -- Ian.
[toc] | [prev] | [next] | [standalone]
| From | Ned Latham <nedlatham@woden.valhalla.oz> |
|---|---|
| Date | 2020-04-05 03:45 -0500 |
| Message-ID | <slrnr8j6m1.g5k.nedlatham@woden.valhalla.oz> |
| In reply to | #72804 |
James Kuyper wrote: > 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. ----snip---- > What's with you? I only asked for a simple explanation for an obscure > comment. You got it. ----snip---- > OK, so you've made it clear that you're complaining about something you > know little about. Wrong. You've made clear that your reading and comprehension are defective. ----snip----
[toc] | [prev] | [next] | [standalone]
| From | Paavo Helde <myfirstname@osa.pri.ee> |
|---|---|
| Date | 2020-04-04 09:02 +0300 |
| Message-ID | <r697tl$rpk$1@dont-email.me> |
| In reply to | #72775 |
On 4.04.2020 0:58, Ned Latham wrote: > Jorgen Grahn wrote: >> Ned Latham wrote: >> ... >>> C++ has become a moving target and a profligate producer of maintenance >>> nightmares. My own projects are okay so far, but I've had to make so >>> many fatuous changes that I'm now actively looking for languages to >>> port them to. >> >> Which changes would that be? Between, say a decent version two >> decades ago (C++98) and a well-supported one today (C++11)? > > Exception throwing: once an option, now the default. > "namespace": once an option, now a requirement. Exception throwing and namespaces were both in the first 1998 C++ standard. The problem with MSVC++ used to be that it purposefully chose to not follow the C++ standard in some places, but this has been mostly fixed in recent versions. What I find seriously objectionable is that the new C++ standards are actually *removing* things from the standard like std::auto_ptr and throw(), causing maintenance issues for old legacy codebases.
[toc] | [prev] | [next] | [standalone]
| From | Ned Latham <nedlatham@woden.valhalla.oz> |
|---|---|
| Date | 2020-04-04 01:20 -0500 |
| Message-ID | <slrnr8g9oh.esa.nedlatham@woden.valhalla.oz> |
| In reply to | #72784 |
Paavo Helde wrote: > On 4.04.2020 0:58, Ned Latham wrote: > > Jorgen Grahn wrote: > > > Ned Latham wrote: > > > ... > > > > C++ has become a moving target and a profligate producer of maintenance > > > > nightmares. My own projects are okay so far, but I've had to make so > > > > many fatuous changes that I'm now actively looking for languages to > > > > port them to. > > > > > > Which changes would that be? Between, say a decent version two > > > decades ago (C++98) and a well-supported one today (C++11)? > > > > Exception throwing: once an option, now the default. > > "namespace": once an option, now a requirement. > > Exception throwing and namespaces were both in the first 1998 C++ > standard. As options. > The problem with MSVC++ used to be that it purposefully chose > to not follow the C++ standard in some places, but this has been mostly > fixed in recent versions. > > What I find seriously objectionable is that the new C++ standards are > actually *removing* things from the standard like std::auto_ptr and > throw(), causing maintenance issues for old legacy codebases. I don't use std: or throw(). They're both crocks, IMO. Maintenance issues are nothing new with C++.
[toc] | [prev] | [next] | [standalone]
| From | Ian Collins <ian-news@hotmail.com> |
|---|---|
| Date | 2020-04-04 19:43 +1300 |
| Message-ID | <heqojoFfrroU2@mid.individual.net> |
| In reply to | #72785 |
On 04/04/2020 19:20, Ned Latham wrote: > Paavo Helde wrote: >> On 4.04.2020 0:58, Ned Latham wrote: >>> Jorgen Grahn wrote: >>>> Ned Latham wrote: >>>> ... >>>>> C++ has become a moving target and a profligate producer of maintenance >>>>> nightmares. My own projects are okay so far, but I've had to make so >>>>> many fatuous changes that I'm now actively looking for languages to >>>>> port them to. >>>> >>>> Which changes would that be? Between, say a decent version two >>>> decades ago (C++98) and a well-supported one today (C++11)? >>> >>> Exception throwing: once an option, now the default. >>> "namespace": once an option, now a requirement. >> >> Exception throwing and namespaces were both in the first 1998 C++ >> standard. > > As options. No different from now. >> The problem with MSVC++ used to be that it purposefully chose >> to not follow the C++ standard in some places, but this has been mostly >> fixed in recent versions. >> >> What I find seriously objectionable is that the new C++ standards are >> actually *removing* things from the standard like std::auto_ptr and >> throw(), causing maintenance issues for old legacy codebases. > > I don't use std: or throw(). They're both crocks, IMO. So you are bitching about stuff that's been a standard part of the language for almost 23 years? That ship has sailed. -- Ian.
[toc] | [prev] | [next] | [standalone]
| From | Ned Latham <nedlatham@woden.valhalla.oz> |
|---|---|
| Date | 2020-04-04 02:10 -0500 |
| Message-ID | <slrnr8gcms.evi.nedlatham@woden.valhalla.oz> |
| In reply to | #72786 |
Ian Collins wrote: > Ned Latham wrote: > > Paavo Helde wrote: > > > Ned Latham wrote: > > > > Jorgen Grahn wrote: > > > > > Ned Latham wrote: > > > > > ... > > > > > > C++ has become a moving target and a profligate producer of maintenance > > > > > > nightmares. My own projects are okay so far, but I've had to make so > > > > > > many fatuous changes that I'm now actively looking for languages to > > > > > > port them to. > > > > > > > > > > Which changes would that be? Between, say a decent version two > > > > > decades ago (C++98) and a well-supported one today (C++11)? > > > > > > > > Exception throwing: once an option, now the default. > > > > "namespace": once an option, now a requirement. > > > > > > Exception throwing and namespaces were both in the first 1998 C++ > > > standard. > > > > As options. > > No different from now. Crap. > > > The problem with MSVC++ used to be that it purposefully chose > > > to not follow the C++ standard in some places, but this has been mostly > > > fixed in recent versions. > > > > > > What I find seriously objectionable is that the new C++ standards are > > > actually *removing* things from the standard like std::auto_ptr and > > > throw(), causing maintenance issues for old legacy codebases. > > > > I don't use std: or throw(). They're both crocks, IMO. > > So you are bitching Try reading with somne attention and commenting with some civility, you fuck. > about stuff that's been a standard part of the > language for almost 23 years? That ship has sailed. You don't get it. According to Paavo, they've been removed. By avoiding them, I've avoided the inconsistencies and the maintenance issues that their temporary presence caused. But then, you'd have to be a programmer to get it.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <Keith.S.Thompson+u@gmail.com> |
|---|---|
| Date | 2020-04-04 01:58 -0700 |
| Message-ID | <87zhbrpqyu.fsf@nosuchdomain.example.com> |
| In reply to | #72788 |
Ned Latham <nedlatham@woden.valhalla.oz> writes:
[...]
> Try reading with somne attention and commenting with some civility,
> you fuck.
[...]
I request that everyone stop feeding this troll.
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips Healthcare
void Void(void) { Void(); } /* The recursive call of the void */
[toc] | [prev] | [next] | [standalone]
| From | Ned Latham <nedlatham@woden.valhalla.oz> |
|---|---|
| Date | 2020-04-04 05:04 -0500 |
| Message-ID | <slrnr8gmu5.f49.nedlatham@woden.valhalla.oz> |
| In reply to | #72792 |
Keith Thompson wrote: > Ned Latham writes: > > Ian Collins wrote: > > > Ned Latham wrote: > > > > Paavo Helde wrote: > > > > > What I find seriously objectionable is that the new C++ > > > > > standards are actually *removing* things from the standard > > > > > like std::auto_ptr and throw(), causing maintenance issues > > > > > for old legacy codebases. > > > > > > > > I don't use std: or throw(). They're both crocks, IMO. > > > > > > So you are bitching > > > > Try reading with some attention and commenting with some civility, > > you fuck. > > I request that everyone stop feeding this troll. I request that someone give the whatever that calls itself Keith Thompson a dictionary and some coaching in civil discourse.
[toc] | [prev] | [next] | [standalone]
| From | Paavo Helde <myfirstname@osa.pri.ee> |
|---|---|
| Date | 2020-04-04 14:37 +0300 |
| Message-ID | <r69ri4$fp1$1@dont-email.me> |
| In reply to | #72788 |
On 4.04.2020 10:10, Ned Latham wrote: > Ian Collins wrote: >> Ned Latham wrote: >>> Paavo Helde wrote: >>>> What I find seriously objectionable is that the new C++ standards are >>>> actually *removing* things from the standard like std::auto_ptr and >>>> throw(), causing maintenance issues for old legacy codebases. >>> >>> I don't use std: or throw(). They're both crocks, IMO. >> >> So you are bitching > > Try reading with somne attention and commenting with some civility, you fuck. > >> about stuff that's been a standard part of the >> language for almost 23 years? That ship has sailed. > > You don't get it. According to Paavo, they've been removed. By avoiding > them, I've avoided the inconsistencies and the maintenance issues that > their temporary presence caused. I guess you probably confused throw() with exceptions. Both exceptions and namespaces (incl. std::) are very much in C++, won't go anywhere, are very useful, and I use them every day. What is removed is the no-throw specification 'throw()'. https://en.cppreference.com/w/cpp/language/except_spec : Syntax throw( ) (1) (deprecated in C++11)(removed in C++20) throw(typeid, typeid, ...) (2) (deprecated in C++11)(removed in C++17)
[toc] | [prev] | [next] | [standalone]
| From | Ned Latham <nedlatham@woden.valhalla.oz> |
|---|---|
| Date | 2020-04-04 07:25 -0500 |
| Message-ID | <slrnr8gv61.fe4.nedlatham@woden.valhalla.oz> |
| In reply to | #72796 |
Paavo Helde wrote: > On 4.04.2020 10:10, Ned Latham wrote: > > Ian Collins wrote: ----snip---- > > > about stuff that's been a standard part of the > > > language for almost 23 years? That ship has sailed. > > > > You don't get it. According to Paavo, they've been removed. By avoiding > > them, I've avoided the inconsistencies and the maintenance issues that > > their temporary presence caused. > > I guess you probably confused throw() with exceptions. Could be. None of that stuff appeals to me, so I don't exactly go out of my way to learn its ins and outs. > Both exceptions > and namespaces (incl. std::) are very much in C++, won't go anywhere, > are very useful, and I use them every day. We're polar opposites then. I avoid them every day (including std::). > What is removed is the no-throw specification 'throw()'. > https://en.cppreference.com/w/cpp/language/except_spec : > > Syntax > throw( ) (1) (deprecated in C++11)(removed in C++20) > throw(typeid, typeid, ...) (2) (deprecated in C++11)(removed in C++17) *sigh* I dunno. It looked like a good language thirty years ago. Some hangover shit from C, but overall one of the best.
[toc] | [prev] | [next] | [standalone]
| From | Paavo Helde <eesnimi@osa.pri.ee> |
|---|---|
| Date | 2020-04-04 17:39 +0300 |
| Message-ID | <r6a5ri$nsr$1@dont-email.me> |
| In reply to | #72800 |
04.04.2020 15:25 Ned Latham kirjutas: > Paavo Helde wrote: >> Both exceptions >> and namespaces (incl. std::) are very much in C++, won't go anywhere, >> are very useful, and I use them every day. > > We're polar opposites then. I avoid them every day (including std::). Ignorance is bliss, they say. > > *sigh* I dunno. It looked like a good language thirty years ago. Some > hangover shit from C, but overall one of the best. C++ has many problems, but for me it's still the best language around. It has never let me down, regardless of how low-level I need to go in the implementation or how high level I want to go in the interfaces and design. Most languages have built up high walls there, either in one (C) or both directions (Java, C#, etc). You are right in that the current C++ (and especially its idiomatic use) is quite different from the pre-standard C++ dialects used in the last century. If all your C++ knowlegde and experience becomes from year 1997, this just means that every opinion you express about current C++ is mostly just babbling.
[toc] | [prev] | [next] | [standalone]
| From | Ned Latham <nedlatham@woden.valhalla.oz> |
|---|---|
| Date | 2020-04-05 04:02 -0500 |
| Message-ID | <slrnr8j7li.g5k.nedlatham@woden.valhalla.oz> |
| In reply to | #72805 |
Paavo Helde wrote: > 04.04.2020 15:25 Ned Latham kirjutas: > > Paavo Helde wrote: > > > Both exceptions > > > and namespaces (incl. std::) are very much in C++, won't go > > > anywhere, are very useful, and I use them every day. > > > > We're polar opposites then. I avoid them every day (including std::). > > Ignorance is bliss, they say. Avoidance and ignorance aren't the same thing. > > *sigh* I dunno. It looked like a good language thirty years ago. Some > > hangover shit from C, but overall one of the best. > > C++ has many problems, but for me it's still the best language around. I use it (for now) because I like the power and the conciseness and the OO paradigm. But if I could find a language with those qualities, plus some other quaqlities I deem important, I'd switch in a heartbeat; fact is, its syntax and readability are woeful and its dependence on parentheses is a PITA. Not to mention the afore-mentioned versionitis. > It has never let me down, regardless of how low-level I need to go in > the implementation or how high level I want to go in the interfaces and > design. What programming language ever has? > Most languages have built up high walls there, either in one (C) You can go very high level in C with ADT's. > or both directions (Java, C#, etc). Never used either. > You are right in that the current C++ (and especially its idiomatic use) > is quite different from the pre-standard C++ dialects used in the last > century. In fact, they've made it *so* different that a new name would be appropriate. > If all your C++ knowlegde and experience becomes from year > 1997, That's a pretty stupid premise. > this just means that every opinion you express about current C++ > is mostly just babbling. And the conclusion's in that category too.
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2020-04-03 19:35 +0200 |
| Message-ID | <r67s55$4oi$1@news.albasani.net> |
| In reply to | #72763 |
I just tried to compile your SP62-program. There are a lot assignments of string-literals to non-const string-pointers. In C++ every string -literal has the type "const char *"; I don't know if this has ever been different in earlier versions of C++, but earlier versions of MSVC accepted the assignment of string-literals to char-pointers. So you have to make your c-strings const. And there are a lot of erors which advise you to use safe versions of C-runtime-functions which are not prone to buffer-overflows. You can disable this errors by defining _CRT_SECURE_NO_WARNINGS or you could use the safer versions the error-message shows you.
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2020-04-03 20:01 +0200 |
| Message-ID | <r67tkt$cc$1@news.albasani.net> |
| In reply to | #72765 |
> I just tried to compile your SP62-program. There are a lot assignments > of string-literals to non-const string-pointers. In C++ every string > -literal has the type "const char *"; I don't know if this has ever > been different in earlier versions of C++, but earlier versions of > MSVC accepted the assignment of string-literals to char-pointers. > So you have to make your c-strings const. ... You could set up a VC++ console project and disable conformance mode in the project-settings. Along with the the define I told about you would get away almost every error. And you're using the function tzset which should be replaced with _tzset. And you're using a lot of uninized variables as function-parameters; that's a lot of bugs.
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2020-04-04 16:16 +0200 |
| Message-ID | <r6a4s9$3v7$1@news.albasani.net> |
| In reply to | #72767 |
> And you're using a lot of uninized variables as function-parameters; > that's a lot of bugs. In some cases the variable is initialized in loop before and the compiler can't see if the loop is actually executed. So if the loop is actually exectuted at least only once nearly everything is fine but you just have to set the variable to an aribtrary value at initialization.
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2020-04-04 18:58 +0200 |
| Message-ID | <r6aebs$fk4$1@news.albasani.net> |
| In reply to | #72803 |
>> And you're using a lot of uninized variables as function-parameters;
>> that's a lot of bugs.
> In some cases the variable is initialized in loop before and the
> compiler can't see if the loop is actually executed. So if the
> loop is actually exectuted at least only once nearly everything
> is fine but you just have to set the variable to an aribtrary
> value at initialization.
Sorry, what I told was nonsense.
I checked it with the following code:
unsigned f123();
unsigned f456( unsigned a, unsigned b )
{
unsigned j;
for( ; a != b; ++a )
j = f123();
return j;
}
The compiler can't say for sure if f123 is called. But
it doesn't complain about that f123 might not get called.
[toc] | [prev] | [next] | [standalone]
| From | Christian Gollwitzer <auriocus@gmx.de> |
|---|---|
| Date | 2020-04-03 22:01 +0200 |
| Message-ID | <r684ml$imf$1@dont-email.me> |
| In reply to | #72765 |
Am 03.04.20 um 19:35 schrieb Bonita Montero:
> I just tried to compile your SP62-program. There are a lot assignments
> of string-literals to non-const string-pointers. In C++ every string
> -literal has the type "const char *"; I don't know if this has ever
> been different in earlier versions of C++, but earlier versions of
> MSVC accepted the assignment of string-literals to char-pointers. So
> you have to make your c-strings const. And there are a lot of erors
> which advise you to use safe versions of C-runtime-functions which
> are not prone to buffer-overflows. You can disable this errors by
> defining _CRT_SECURE_NO_WARNINGS or you could use the safer versions
> the error-message shows you.
I also tried to compile the SP71 program. There were only 7 real errors.
There is the idiotic for-scoping that was wrong in VC6. In VC 6, if you
write
for (int i=0; i<n; i++) { }
then the i variable belongs to the outer block, whereas in C++ since
1998 it belongs to the for block. So shift this to
int i;
for (i=0; i<n; i++) { }
to get the same effect. Then there was an default-to-int static variable
without a type; even the compiler knew how to fix it:
SP71_lib.cpp:16155:9: error: C++ requires a type specifier for all
declarations
static column_counter = 0 ;
~~~~~~ ^
1 error generated.
and a missing comma in a sequence of declarations; I wonder how that
ever could compile.
Now it compiles on clang, but with 283 warnings, of course. Here's the diff:
Apfelkiste:Tests chris$ diff -r SP_new/ SP
diff -r SP_new/SP71_head.h SP/SP71_head.h
660c660
< {symbol *s ; int i; for (i = 0; i < sequence_depth; i++)
---
> {symbol *s ; for (int i = 0; i < sequence_depth; i++)
diff -r SP_new/SP71_lib.cpp SP/SP71_lib.cpp
2347c2347
< for (int i = 1; i < start_col_2; i++)
---
> for (i = 1; i < start_col_2; i++)
12200c12200
< *t_pattern = get_row_pattern(bottom_row),
---
> *t_pattern = get_row_pattern(bottom_row)
16155c16155
< static int column_counter = 0 ;
---
> static column_counter = 0 ;
Only in SP_new/: a.out
Apfelkiste:Tests chris$
Christian
[toc] | [prev] | [next] | [standalone]
| From | Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk> |
|---|---|
| Date | 2020-04-03 21:05 +0100 |
| Message-ID | <MFMhG.13712$Vc5.12096@fx07.ams1> |
| In reply to | #72770 |
On 03/04/2020 21:01, Christian Gollwitzer wrote: > Am 03.04.20 um 19:35 schrieb Bonita Montero: >> I just tried to compile your SP62-program. There are a lot assignments >> of string-literals to non-const string-pointers. In C++ every string >> -literal has the type "const char *"; I don't know if this has ever >> been different in earlier versions of C++, but earlier versions of >> MSVC accepted the assignment of string-literals to char-pointers. So >> you have to make your c-strings const. And there are a lot of erors >> which advise you to use safe versions of C-runtime-functions which >> are not prone to buffer-overflows. You can disable this errors by >> defining _CRT_SECURE_NO_WARNINGS or you could use the safer versions >> the error-message shows you. > > I also tried to compile the SP71 program. There were only 7 real errors. There is the idiotic for-scoping that was wrong in VC6. In VC 6, if you write VC6 is NOT a C++ compiler, it is VC6 compiler. /Flibble -- "Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin “You won’t burn in hell. But be nice anyway.” – Ricky Gervais “I see Atheists are fighting and killing each other again, over who doesn’t believe in any God the most. Oh, no..wait.. that never happens.” – Ricky Gervais "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Byrne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say."
[toc] | [prev] | [next] | [standalone]
Page 3 of 4 — ← Prev page 1 2 [3] 4 Next page →
Back to top | Article view | comp.lang.c++
csiph-web