- if cargo blocks - 6 Updates
- Integers - 7 Updates
- Hell is real, so is Heaven - 4 Updates
- Temporary hiatus - 1 Update
Ian Collins <ian-news@hotmail.com>: Jan 04 11:10AM +1300 On 03/01/2019 09:54, Rick C. Hodgin wrote: >> Why are proposing (at lest in c.l.c++) an unpleasant replacement for >> something the language already supports? > I am unaware of its existence. Enlighten me, sir Ian. Fibble as already answered this in his own inimitable style. Something like this will do what you want in C++: void f(bool some_test1) { struct T1 { bool cleaned {}; T1() {} // setup_for_test1 ~T1() { if (!cleaned) cleanup(); } // cleanup_for_test1 void related_code_if_block_entered() {} void cleanup() { cleaned = true; } }; T1 t1; if (some_test1) { t1.related_code_if_block_entered(); // Code1 here for this test passing } else { t1.cleanup(); } } -- Ian. |
Ian Collins <ian-news@hotmail.com>: Jan 04 11:11AM +1300 On 03/01/2019 10:29, Rick C. Hodgin wrote: >>> something the language already supports? >> I am unaware of its existence. Enlighten me, sir Ian. > [crickets] Cricket, singular. One of the joys of summer. -- Ian |
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Jan 03 02:37PM -0800 On 1/3/2019 2:11 PM, Ian Collins wrote: >>> I am unaware of its existence. Enlighten me, sir Ian. >> [crickets] > Cricket, singular. One of the joys of summer. Man, one time in particular, I saw a cluster of crickets being invaded by a bunch of ravenous ants in South Lake Tahoe. Each ant was around a half inch in length. The crickets were fish bait anyway, so their enclosure had holes in it for ventilation. The damn ants raided it. By the time I noticed the attack, they were tearing cricket limbs off to immobilize them, many dead: Terrible. There was another victim, a large june bug was being carefully dissected by the riled up ants. Should ants be sent to hell: Burned forever with a magnifying glass, perhaps even a solar furnace? ;^) https://youtu.be/KAiVUn_ukdI (yellow crazy ants murdering crabs!) wow. |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jan 03 05:47PM -0500 On 1/3/2019 5:10 PM, Ian Collins wrote: > t1.cleanup(); > } > } Okay. Really? A non-unpleasant workaround? :-) There are existing ways to make almost anything work. Out of curiosity, how do you get your non-unpleasant solution to work on multi-conditional if..else if..else blocks? if (test1) in { ... } out { ... } enter { ... } { // Code here } else if (test2) in { ... } out { ... } enter { ... } { // Code here } else if (test3) in { ... } out { ... } enter { ... } { // Code here } else in { ... } out { ... } enter { ... } { // Code here } And, since the code is encapsulated in its intended and purposeful meaning by location, does your solution have the ability to collapse the in/out/enter block code so they appear like this until expanded or needed? if (test1) +in +out +enter { // Code here } else if (test2) +in +out +enter { // Code here } else if (test3) +in +out +enter { // Code here } else +in +out +enter { // Code here } I would expect a reply like your from Fibble. But, I do not expect it from you. You are a superior developer in my estimation, though I may be wrong in that assessment, but given some of your replies over time I hold you in a regard high enough to see the difference between Fibble's solution, and the one I propose. -- Rick C. Hodgin |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jan 03 05:48PM -0500 On 1/3/2019 5:11 PM, Ian Collins wrote: >>> I am unaware of its existence. Enlighten me, sir Ian. >> [crickets] > Cricket, singular. One of the joys of summer. Never played it. Just below 0C here. I, of course, was referring to the noise made when no other sounds are being heard. Just the crickets making noise in the background. Awkward silence cricket sound: https://www.youtube.com/watch?v=DNGzaeLJrNU -- Rick C. Hodgin |
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Jan 03 03:02PM -0800 On 1/3/2019 2:10 PM, Ian Collins wrote: > t1.cleanup(); > } > } For some reason, this reminds me of ScopeGuard. Fwiw, here is an old post on drdobbs: http://www.drdobbs.com/cpp/generic-change-the-way-you-write-excepti/184403758 |
jameskuyper@alumni.caltech.edu: Jan 03 09:39AM -0800 On Thursday, January 3, 2019 at 12:05:05 PM UTC-5, bitrex wrote: > who have a specific answer in mind and if you answer (correctly) with > "well, it depends" you're not going to get points for that - even the > interviewer hasn't fully thought it over. Simply saying "it depends" would certainly not win points. However, giving a correct and complete description of how it depends upon the features of the implementation should win me the maximum possible points. I can imagine two possible exceptions: the interviewer doesn't recognize it as a correct answer, or is afraid of hiring someone who knows more than he does. Either way, it's probably not a place I'd want to work. |
jameskuyper@alumni.caltech.edu: Jan 03 09:45AM -0800 On Thursday, January 3, 2019 at 12:26:30 PM UTC-5, Alf P. Steinbach wrote: > Disclaimer: it's late in the day for me, AND I don't have a > standard-conforming 16-bit C++ compiler to try this out on. But. Still > sounds right when I read what I wrote! :) You're right. But no matter how uint16_t is typedef'd, the result is always multiplication as unsigned 16 bit integers. I decided to gloss over that complication in a posting that was already overly-complex. |
bitrex <user@example.net>: Jan 03 02:50PM -0500 On 01/03/2019 12:26 PM, Alf P. Steinbach wrote: >> Which of these cases applied when you found the answer "the hard way"? > Cheers!, > - Alf <https://herbsutter.com/2018/11/13/trip-report-fall-iso-c-standards-meeting-san-diego/> "For comparison, even excluding the biggest paper which was the updated C++ standard working draft which appears in every mailing, the pre-meeting mailing was enormous: By word count, it exceeded Shakespeare's complete published works." They write like they're proud of this! |
Siri Cruise <chine.bleu@yahoo.com>: Jan 03 12:24PM -0800 Turing created integers, all the rest is the work of IEEE. -- :-<> Siri Seal of Disavowal #000-001. Disavowed. Denied. Deleted. @ 'I desire mercy, not sacrifice.' /|\ The first law of discordiamism: The more energy This post / \ to make order is nore energy made into entropy. insults Islam. Mohammed |
jameskuyper@alumni.caltech.edu: Jan 03 01:04PM -0800 On Thursday, January 3, 2019 at 2:50:45 PM UTC-5, bitrex wrote: ... > pre-meeting mailing was enormous: > By word count, it exceeded Shakespeare's complete published works." > They write like they're proud of this! Keep in mind that that's the total size of the proposals for changes to the C++ standard. If he is indeed proud of that number it's only because that large it shows the amount of interest people have in the C++ standard. His use of "enormous" implies to me that he thought it was an appallingly large amount of text to have to read. |
bitrex <user@example.net>: Jan 03 04:13PM -0500 > that large it shows the amount of interest people have in the C++ > standard. His use of "enormous" implies to me that he thought it was an > appallingly large amount of text to have to read. I think I'd prefer to read the complete published works of Shakespeare if there's an option... |
Paavo Helde <myfirstname@osa.pri.ee>: Jan 03 11:53PM +0200 > uint32_t are named T and U respectively, then > U z = U(x)*U(y); > might reduce the number of unexpected results (depending upon what you're expecting). Thanks for the suggestions, this seems the way to go. > small; either way, U(x)*U(y) would not give the best result. > Similar but more complicated issues arise if T is a complex type, and U > is a real type. That's good to keep in mind too. |
gazelle@shell.xmission.com (Kenny McCormack): Jan 03 05:42PM In article <0dbd9a81-1ea0-4dd0-b6d1-a9f8c809a8c3@googlegroups.com>, >> value on God's influence in their lives. >Indeed ... Muslims are last followers of your kind of Christian >values. Excellent point. Here in the USA (where both Rick & I live), the people who most rail against Muslims are precisely those people who most want society to be organized like it is in Muslim countries and who want people (i.e., other people) to have to live like Muslims do. -- No puppet. No puppet. You're a puppet. |
Siri Cruise <chine.bleu@yahoo.com>: Jan 03 11:14AM -0800 In article <0b022359-af0a-4f06-bc3a-807ebd57e421@googlegroups.com>, > On Thursday, January 3, 2019 at 6:19:39 AM UTC-5, Kenny McCormack wrote: > > In article <q0kqjg$91h$1@dont-email.me>, > > jacobnavia <jacob@jacob.remcomp.fr> wrote: Ce qui soit soit. Unless you're a god, you're guessing, just like everyone else. How about showing some tolerance for people with different guesses. Duly deputised representatives of city and state of New York do not count. -- :-<> Siri Seal of Disavowal #000-001. Disavowed. Denied. Deleted. @ 'I desire mercy, not sacrifice.' /|\ The first law of discordiamism: The more energy This post / \ to make order is nore energy made into entropy. insults Islam. Mohammed |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jan 03 12:47PM -0800 On Thursday, January 3, 2019 at 2:14:52 PM UTC-5, Siri Cruise wrote: > > > In article <q0kqjg$91h$1@dont-email.me>, > > > jacobnavia <jacob@jacob.remcomp.fr> wrote: > Ce qui soit soit. Unless you're a god, you're guessing, just like everyone else. God has told us what He will judge and how to live. I repeat to you His guidance. Your issues are with Him, not me. I'm a messenger. -- Rick C. Hodgin |
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Jan 03 01:27PM -0800 On 1/3/2019 7:22 AM, Melzzzzz wrote: >> by the convictions of non-religious regimes than by religious regimes and it >> still continues. > Communism is also religion... It sure seems to be. Almost like a hive mind worshiping the queen. |
Tim Rentsch <txr@alumni.caltech.edu>: Jan 02 09:48PM -0800 Group members, Just a heads up - I will be taking a temporary hiatus, starting immediately, from netnews posting, until a new email address stabilizes. The email address in this posting no longer works for me. Happy New Year and hope to be back soon, (see From: line for .sig) |
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