- Structured binding considered harmful - 14 Updates
- what do you think about this? - 2 Updates
- My thoughts and prayers - 1 Update
- About using auto with class member functions - 8 Updates
Jorgen Grahn <grahn+nntp@snipabacken.se>: Mar 21 10:33PM On Sat, 2020-03-21, Öö Tiib wrote: ... > god damned shared_ptr. Can make sub-repositories? So lets make hundred > of those for every taste but lets make one or two of those huge. And be > sure to arrange those sub-repositories as directed graph with cycles. You may be interested to hear that I laughed out loud when I read that. :-) I know exactly what you mean, and it is depressing ... but it's kind of funny, too. The software company or project that can overcome that (both the "two camps" thing and the "more extreme is always better" thing) would be in a very good position. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o . |
jacobnavia <jacob@jacob.remcomp.fr>: Mar 22 01:22PM +0100 Le 21/03/2020 à 14:51, Sam a écrit : >> You have to know the type > If you have the right skills, you don't need to know the type. That's > what separates a real C++ developer from a wanna-be. Your tone. That's right, that hideous tone you use. That overflowing self esteem that transpires "You are an idiot, a wanna-be. I am a real expert", that complete lack of elementary manners, that's what makes you so nauseating. But surely you will not understand that. To do that, you would have to know less of C++ and more about manners. |
Jorgen Grahn <grahn+nntp@snipabacken.se>: Mar 22 01:24PM On Sun, 2020-03-22, jacobnavia wrote: > Le 21/03/2020 à 14:51, Sam a écrit : ... > self esteem that transpires "You are an idiot, a wanna-be. I am a real > expert", that complete lack of elementary manners, that's what makes you > so nauseating. It's just calculated to troll BM. Relax, and use your killfile, like I did. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o . |
James Kuyper <jameskuyper@alumni.caltech.edu>: Mar 22 06:32AM -0700 On Sunday, March 22, 2020 at 8:22:22 AM UTC-4, jacobnavia wrote: > Le 21/03/2020 à 14:51, Sam a écrit : ... > self esteem that transpires "You are an idiot, a wanna-be. I am a real > expert", that complete lack of elementary manners, that's what makes you > so nauseating. Keep in mind that Bonita has no better manners than Sam. His comment don't imply that he's an expert. He's only claiming to be able to do what she says cannot be done, and that claim implies nothing more than ordinary C++ programming skills. |
Sam <sam@email-scan.com>: Mar 22 10:24AM -0400 jacobnavia writes: > esteem that transpires "You are an idiot, a wanna-be. I am a real expert", > that complete lack of elementary manners, that's what makes you so > nauseating. Doing a mental inventory, I can recall very, very few instances where I found someone's contributions to Usenet history to be unworthy of my partake. And the response from me, in those cases, was strictly limited to adjusting my filter. But without making a grandiose announcement of that fact, with pomp and circumstance. The need to do so, that I observe in others, betrays their own vanities, egos and delusions of self-grandeur and self-importance. Which far exceeds mine's. > But surely you will not understand that. To do that, you would have to know > less of C++ and more about manners. No shit? Screw that. |
Daniel <danielaparker@gmail.com>: Mar 22 07:59AM -0700 On Sunday, March 22, 2020 at 9:32:53 AM UTC-4, James Kuyper wrote: > > self esteem that transpires "You are an idiot, a wanna-be. I am a real > > expert", that complete lack of elementary manners, that's what makes you > > so nauseating. Yes. > Keep in mind that Bonita has no better manners than Sam. False on this thread. Bonita's replies to Sam are restrained and respectful and her point is justifiable. > He's only claiming to be able to do what she says cannot be done, and that > claim implies nothing more than ordinary C++ programming skills. I find this response even more depressing than Sams'. Even Sam concedes he is trolling Bonita. His "claim", to the extent he is making one, is wrong. The point of contention is whether whether auto can always be used safely, and the answer is clearly and demonstrably "no", which is Bonita's point. In particular it can't be used with classes following popular proxy idioms without introducing undefined behavior. If James Kuyper doesn't understand that, he can read, Scott Meyer has written a lot about it, as have others. But this isn't about the correctness of any claim, this is about James Kuyper saying he's perfectly okay with Sam using condescending language including "wanna-be", "limited capacity", "Here are your toys. You can go home now". James Kuyper is going to be the second person that is going into my kill file. Daniel |
Sam <sam@email-scan.com>: Mar 22 01:02PM -0400 Daniel writes: > one, is wrong. The point of contention is whether whether auto can always be > used safely, and the answer is clearly and demonstrably "no", which is > Bonita's point. I'm curious as to which features of C++ can "always be used safely", and what exactly does that mean. Can for loops "always be used safely"? Of course not. Easy to get a buffer overrun, by typoing "<=" instead of "<" in a loop condition. The chances of a warning from a typical C++ compiler are nil. So, applying the same standard to "for" as in "auto" we must conclude that the use of "for" loops must be discouraged. After all, they can't "always be used safely". > home now". James Kuyper is going to be the second person that is going into > my kill file. Maybe you should publish your famous kill file on your web site, so that everyone can sit back and applaud how smart you are, and how devoted you are to maintaining the quality of discourse on Usenet. Are you somebody important, by any chance? Important enough so that everyone needs to know who's in your kill file? |
Melzzzzz <Melzzzzz@zzzzz.com>: Mar 22 05:09PM > Content-Type: application/pgp-signature > Content-Transfer-Encoding: 7bit > --=_monster.email-scan.com-37141-1584896550-0001-- James is repectfull to me. Bonita is novice buffon, and offended me several times... I am old programmer. -- press any key to continue or any other to quit... U ničemu ja ne uživam kao u svom statusu INVALIDA -- Zli Zec Svi smo svedoci - oko 3 godine intenzivne propagande je dovoljno da jedan narod poludi -- Zli Zec Na divljem zapadu i nije bilo tako puno nasilja, upravo zato jer su svi bili naoruzani. -- Mladen Gogala |
Sam <sam@email-scan.com>: Mar 22 01:35PM -0400 Melzzzzz writes: > James is repectfull to me. Bonita is novice buffon, > and offended me several times... > I am old programmer. I am not exactly a spring chicken either. But nobody can offend me without my permission, first. And I do not give anyone permission to offend me. |
Melzzzzz <Melzzzzz@zzzzz.com>: Mar 22 05:54PM >> I am old programmer. > I am not exactly a spring chicken either. But nobody can offend me without > my permission, first. And I do not give anyone permission to offend me. Unless someone offends you ;) -- press any key to continue or any other to quit... U ničemu ja ne uživam kao u svom statusu INVALIDA -- Zli Zec Svi smo svedoci - oko 3 godine intenzivne propagande je dovoljno da jedan narod poludi -- Zli Zec Na divljem zapadu i nije bilo tako puno nasilja, upravo zato jer su svi bili naoruzani. -- Mladen Gogala |
danielaparker@gmail.com: Mar 22 10:58AM -0700 On Sunday, March 22, 2020 at 1:09:35 PM UTC-4, Melzzzzz wrote: > I am old programmer. I'm getting old too, too old to relate to the woke generation, too old to understand the nuances of gender distinctions. But the older generations valued courtesy and manners, and the antithesis of that on display here bothers me more than the proselytizers and trolls, and I think it causes more harm to the group. I'm thankful for the help I've received from members over the years, but otherwise feel this is not a good place for me to be, so my last post. Be well, Daniel |
Ian Collins <ian-news@hotmail.com>: Mar 23 07:41AM +1300 On 23/03/2020 03:59, Daniel wrote: >> Keep in mind that Bonita has no better manners than Sam. > False on this thread. Bonita's replies to Sam are restrained and respectful > and her point is justifiable. Sipping attributions is never respectful. -- Ian. |
James Kuyper <jameskuyper@alumni.caltech.edu>: Mar 22 03:01PM -0400 On 3/22/20 10:59 AM, Daniel wrote: > On Sunday, March 22, 2020 at 9:32:53 AM UTC-4, James Kuyper wrote: >> On Sunday, March 22, 2020 at 8:22:22 AM UTC-4, jacobnavia wrote: ... >>> self esteem that transpires "You are an idiot, a wanna-be. I am a real >>> expert", that complete lack of elementary manners, that's what makes you >>> so nauseating. ... >> Keep in mind that Bonita has no better manners than Sam. > False on this thread. Bonita's replies to Sam are restrained and respectful > and her point is justifiable. Bonita routinely insults anyone who disagrees with her, calling them incompetent. If anyone dares to claim to have actual experience disagreeing with what she considers to be possible, she routinely responds by calling them liars. She often does these things instead of responding to the points they raised. This wouldn't be so bothersome if she restricted such activities to people who were actually incompetent or liars. However, many of the people she's accused of incompetence have demonstrated more competence in this newsgroup than she ever has, and many of the things that she says have to be lies because they don't fit her understanding of how things work are things I have observed with my own eyes. And, as Ian rightly pointed out, there's nothing respectful about quoting other people's words without properly attributing them. > Sam concedes he is trolling Bonita. His "claim", to the extent he is making > one, is wrong. The point of contention is whether whether auto can always be > used safely, Some people are arguing that auto can't always be used safely - but with no one disagreeing with them on that point, it can't accurately be described as a point of contention. What is being claimed is that auto can often be used safely - what it conceals about the type it stands in for is often something that there is no need to know about, at least, not if the code actually compiles without relevant warnings or error messages. |
Sam <sam@email-scan.com>: Mar 22 05:19PM -0400 Melzzzzz writes: > > I am not exactly a spring chicken either. But nobody can offend me without > > my permission, first. And I do not give anyone permission to offend me. > Unless someone offends you ;) Nope, nobody has my permission to offend me. Now, someone can say, or write, anything they can. I can't stop anyone from writing or saying something to me. But no matter they write, or say, the only possible way they can offend me is that if they get my premission to do that, in advance. And I simply don't give anyone permission to offend me, that's all. |
alelvb <alelvb@inwind.it>: Mar 22 08:38PM +0100 Hello groupers, I have a curiosity I'd like to be answered. wouldn't it be great if C++ could give to the programmer the disposal of wildcard operator such that it could be substituted by any user (oportunaly) defined character symbol? for example in physics there exist many different kind of product symbols for vector products, namely ∙ dot product U+2219 × cross product U+2A2F ∧ wedge product U+2227 ⊗ tensor product U+2297 suppose I could overload this generic wildcard operator giving it one of the symbols above. Wouldn't be nice writing something like: [return type] wildcard_operator(wchar_t op_symbol, Vector a, Vector, b) { // operator implementation } and use it usually: Vector v = a ∧ b; instead of the traditional explicit call: Vector v = a.wedge_product(b); ?? Thank you, alessandro |
Jorgen Grahn <grahn+nntp@snipabacken.se>: Mar 22 08:36PM On Sun, 2020-03-22, alelvb wrote: > instead of the traditional explicit call: > Vector v = a.wedge_product(b); > ?? It was proposed back in the 1980s, and Stroustrup describes in his "Design and Evolution of C++" book (11.6.2) why it was rejected. I can't summarize it ... one problem was giving associativity and precendence for such operators. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o . |
rick.c.hodgin@gmail.com: Mar 22 01:29PM -0700 Incredible world changes are taking place. My thoughts and prayers go out to the people of this world who need a shining light in these darkening uncertain times. Remember the Lord Jesus Christ came to forgive us, to forgive our mistakes, forgive our sin. He came to set us free, to give us eternal life, the promise of hope and love we can rely on. Ask Jesus to forgive your sin today, and feel the newness of life enter in, and the burden of sin and guilt you've been carrying come off. My heart of love goes out to each of you. May the Lord free you, then bind you up in His Kingdom, and keep secure you no matter what comes. Love. Joy. Peace. Hope. In Christ alone. -- Rick C. Hodgin https://www.youtube.com/watch?v=yAkhWkQ0ekE |
red floyd <no.spam@its.invalid>: Mar 21 04:33PM -0700 On 3/21/20 4:17 PM, JiiPee wrote: > Or is some kind of mix best solution (like using auto only with > long/difficult return types)? > How do you do this? I would go for the first set, but that's me. |
Ian Collins <ian-news@hotmail.com>: Mar 22 12:47PM +1300 On 22/03/2020 12:17, JiiPee wrote: > Or is some kind of mix best solution (like using auto only with > long/difficult return types)? > How do you do this? You can't use auto if the function definition isn't visible? I only ever use auto return form function local to a compilation unit (basically those in the anonymous namespace) or those tiny functions defined in the class declaration. If you can't determine the type, neither can the compiler! -- Ian. |
Melzzzzz <Melzzzzz@zzzzz.com>: Mar 22 03:11AM > Is it a good idea to use auto -return value with all class member > function, or use the return type? No, auto is not good for that. In haskell, one writes funtion signatures for all functions, only for local functions signature is not needed. That's just convention and makes better compiler errors. -- press any key to continue or any other to quit... U ničemu ja ne uživam kao u svom statusu INVALIDA -- Zli Zec Svi smo svedoci - oko 3 godine intenzivne propagande je dovoljno da jedan narod poludi -- Zli Zec Na divljem zapadu i nije bilo tako puno nasilja, upravo zato jer su svi bili naoruzani. -- Mladen Gogala |
Paavo Helde <myfirstname@osa.pri.ee>: Mar 22 06:10AM +0200 On 22.03.2020 1:17, JiiPee wrote: > ? > Or is some kind of mix best solution (like using auto only with > long/difficult return types)? This depends first on the scope and lifetime of the project, there are no universal rules. In small and short-living projects one can obviously use much more 'auto' than in an official interface meant to fix a library public interface for decades. Anyway, auto should be used only if the return type is obvious. With things like getScreenWidth() it's not so obvious, there are some people who believe widths and heights should be unsigned. So in order to use the result in calculations, and to avoid various compilers' warnings about signed-unsigned mix, one really needs to know if the return type is signed or unsigned. The function declaration is the best place to specify this, for both the users of the function and for the potential future code maintainers. Besides, 'auto' is more characters to type than 'int'. With more complex types like in getScreen() the things are not so clear any more, too much noise on the screen is no good either. If the function itself is really trivial "return member_;" then I guess using 'auto' would be fine or even preferred. For anything more complex than a trivial getter I would do without auto and use some typedefs or aliases to reduce the clutter instead. |
Melzzzzz <Melzzzzz@zzzzz.com>: Mar 22 04:16AM > For anything more complex than a trivial getter I would do without auto > and use some typedefs or aliases to reduce the clutter instead. This. -- press any key to continue or any other to quit... U ničemu ja ne uživam kao u svom statusu INVALIDA -- Zli Zec Svi smo svedoci - oko 3 godine intenzivne propagande je dovoljno da jedan narod poludi -- Zli Zec Na divljem zapadu i nije bilo tako puno nasilja, upravo zato jer su svi bili naoruzani. -- Mladen Gogala |
David Brown <david.brown@hesbynett.no>: Mar 22 10:18AM +0100 On 22/03/2020 00:17, JiiPee wrote: > Or is some kind of mix best solution (like using auto only with > long/difficult return types)? > How do you do this? For the public member functions in a class, you are providing an interface for users - so it should be as clear as possible what the function does, and that includes the return type. You can't use "auto" return type unless the function is defined in the same unit (so that the compiler can figure out the return type). So if the function is so short that it is just a "return" statement defined inline in the class definition, with an obvious type, then "auto" would be okay. But in general you should have explicit types. An exception could be for very complex return return types where the exact type is not likely to be useful for the caller (though even then, you might be better declaring the type explicitly in a "using" statement). It's also necessary to use "auto" for types that can't be given explicitly, like lambdas. For private member functions, you can be more flexible, as users should not care about the types. |
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Mar 22 10:43AM +0100 On 22.03.2020 05:10, Paavo Helde wrote: > use much more 'auto' than in an official interface meant to fix a > library public interface for decades. > Anyway, auto should be used only if the return type is obvious. When even experienced programmers use "auto" to refer to inferred return type, then maybe it's time to give up the terminology struggle. So, let's agree that henceforth "auto" means inferred return type. We can use the term "modern syntax" for trailing return type. Or just spell it out, "trailing return type". > With > things like getScreenWidth() it's not so obvious, there are some people > who believe widths and heights should be unsigned. Well, Mr. Flibble is in that group, as I recall. I think it's a kind of group affinity madness akin to religion. Happily the leading voices of the C++ community have now for some years argued against that idiocy, and the core guidelines recommend against it, <url: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-mix>. > is signed or unsigned. The function declaration is the best place to > specify this, for both the users of the function and for the potential > future code maintainers. Yep. > 'auto' would be fine or even preferred. > For anything more complex than a trivial getter I would do without auto > and use some typedefs or aliases to reduce the clutter instead. - Alf |
JiiPee <no@notvalid.com>: Mar 22 08:22PM Ok so most answers say that better to type the type and not use auto. I was also thinking that might be better, so I think I ll go with this as well. |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment