- Niuce C++14-feature - 24 Updates
- An alternative to reverse-iterators - 1 Update
| MrSpook_sey@tad.gov.uk: May 17 07:42AM On Sun, 16 May 2021 18:10:41 +0200 >The additional lookup-overloads could be generally activated and >there would be an error if ther wouldn't be a proper calling-ope- >rator for a certain key-type. Another solution looking for a problem and (as usual with C++) an ugly hack to make it work. What a surprise. Not. |
| Bonita Montero <Bonita.Montero@gmail.com>: May 17 08:20AM +0200 > Compare is injected to std::set compile time, if it has > is_transparent member is also evaluated compile time and > based to that is decided what members the set has. But why is this actually necessary ? operator [] could forward any parameter for comparison to the ()-operator. |
| MrSpook_f4zl13qm@8lfoe01ih4ebku.com: May 17 09:26AM On Mon, 17 May 2021 08:20:19 +0200 >> based to that is decided what members the set has. >But why is this actually necessary ? operator [] could >forward any parameter for comparison to the ()-operator. Or you could just iterate through the set and do the comparison manually. 1 line of code. |
| Bonita Montero <Bonita.Montero@gmail.com>: May 17 12:52PM +0200 >> forward any parameter for comparison to the ()-operator. > Or you could just iterate through the set and do the comparison > manually. 1 line of code. That's not related to what I said and not even a joke. |
| Juha Nieminen <nospam@thanks.invalid>: May 17 10:58AM > Another solution looking for a problem and (as usual with C++) an ugly > hack to make it work. What a surprise. Not. Are you in the habit of going to the forums of different kinds of topics, like programming languages, and acting like an asshole? If you don't like the language, then don't use it. It's that simple. You can just go and fuck off. Go wank to whatever other language you think is so much better. |
| Bonita Montero <Bonita.Montero@gmail.com>: May 17 01:28PM +0200 > Another solution looking for a problem and (as usual with C++) > an ugly hack to make it work. What a surprise. Not. Tell me why this is a hack. |
| MrSpook_yMgsa7x5@3ifr32ivepk32ia.org: May 17 11:29AM On Mon, 17 May 2021 12:52:26 +0200 >> Or you could just iterate through the set and do the comparison >> manually. 1 line of code. >That's not related to what I said and not even a joke. No its not a joke, its a fact. If you want to find something in std::set thats not based on the value used for sorting then just iterate, there's no need for yet another hack added to the language to do it. |
| MrSpook_vj8xvznaud@d16tgqd.co.uk: May 17 11:32AM On Mon, 17 May 2021 10:58:27 +0000 (UTC) >If you don't like the language, then don't use it. It's that simple. >You can just go and fuck off. Go wank to whatever other language you think >is so much better. _____ || || |\___/| | | | | | | | | | | | | _____|<--->|_____ / | | \ ____| | | |_ / | | | | \ | | | | | | | | | | | | | | | | | | | / | / \ / \ / | | | | |
| MrSpook_97@bxos5xe28b1i1n7kh.ac.uk: May 17 11:34AM On Mon, 17 May 2021 13:28:34 +0200 >> Another solution looking for a problem and (as usual with C++) >> an ugly hack to make it work. What a surprise. Not. >Tell me why this is a hack. using is_transparent = void; Is a hack. What's it for? If the compiler can handle multitype lookups using find() then it should just handle them, not require some bizarre compiler switch embedded in code. |
| Bonita Montero <Bonita.Montero@gmail.com>: May 17 01:41PM +0200 > Is a hack. What's it for? If the compiler can handle multitype lookups > using find() then it should just handle them, not require some bizarre > compiler switch embedded in code. Of course it can, but there must be some sense in this. That's what I asked for. But as you also can see the sense in this keep quiet. C++ has been carefully designed. |
| Bonita Montero <Bonita.Montero@gmail.com>: May 17 01:42PM +0200 > No its not a joke, its a fact. If you want to find something in std::set > thats not based on the value used for sorting then just iterate, there's > no need for yet another hack added to the language to do it. Ok, you absolutely don't have any clue about the sense of this feature. So keep quiet. |
| Juha Nieminen <nospam@thanks.invalid>: May 17 12:03PM > \ / > | | > | | If you act like an asshole, then expect to be treated like an asshole, fucking asshole. |
| MrSpook_gT9q@x057vr3tuoe9s_ht3c.net: May 17 01:18PM On Mon, 17 May 2021 12:03:51 +0000 (UTC) >> | | >If you act like an asshole, then expect to be treated like an asshole, >fucking asshole. Its spelt arsehole except in the american dialect since they can't tell the difference between their backsides and a type of donkey. |
| MrSpook_b89m0or3@x1_pxvs4h8sxxi.gov.uk: May 17 01:29PM On Mon, 17 May 2021 13:41:22 +0200 >Of course it can, but there must be some sense in this. >That's what I asked for. But as you also can see the >sense in this keep quiet. C++ has been carefully designed. ROTFL! :) Yeah, right! Thats why we have: - "= 0" nonsense for pure virtuals, t - idiotic reuse of various prior keywords and operators just to cause confusion such as "class" for templates until they finally saw sense and brought in "typename" and implicit precedence insanities such as cout << 1 << 2; - duplicate functionality instead of extending, eg using vs typedef - context sensitive grammar, eg blah(123) could be an object definition or a function call - static members have to be initialised outside of the class definition for [reasons] but static const? Go right ahead. Those are off the top of my head, there are loads of others. |
| MrSpook_zSl@bw3y07so7dr3go2x.tv: May 17 01:31PM On Mon, 17 May 2021 13:42:22 +0200 >> no need for yet another hack added to the language to do it. >Ok, you absolutely don't have any clue about the sense of this >feature. So keep quiet. I'm sure the feature has its uses for people too lazy to write (for auto&..) , I'm talking about the hack needed to compile it. |
| Juha Nieminen <nospam@thanks.invalid>: May 17 02:02PM >>fucking asshole. > Its spelt arsehole except in the american dialect since they can't tell > the difference between their backsides and a type of donkey. Just go wank whatever language you think is better, asshole. |
| Juha Nieminen <nospam@thanks.invalid>: May 17 02:03PM > ROTFL! :) Why don't you go troll some other forum, asshole? Just fuck off. |
| Bonita Montero <Bonita.Montero@gmail.com>: May 17 04:06PM +0200 > - "= 0" nonsense for pure virtuals, t In most OOP-languages you've to declare pure virtual functions. > - idiotic reuse of various prior keywords and operators just to cause confusion > such as "class" for templates until they finally saw sense and brought in > "typename" and implicit precedence insanities such as cout << 1 << 2; Minor cosmetics ... > - duplicate functionality instead of extending, eg using vs typedef That's not a problem. > - context sensitive grammar, eg blah(123) could be an object definition or a > function call That's not a problem. > - static members have to be initialised outside of the class definition for > [reasons] but static const? Go right ahead. You can declare them as inline so you won't need a declaration in a .cpp-file. |
| MrSpook_rtfm7b8w@g403t8gw2b59awtit.tv: May 17 02:54PM On Mon, 17 May 2021 14:02:14 +0000 (UTC) >> Its spelt arsehole except in the american dialect since they can't tell >> the difference between their backsides and a type of donkey. >Just go wank whatever language you think is better, asshole. Oh dear, is it your time of the month buttercup? :) |
| MrSpook_cOJ9@yr_8g_4nz.com: May 17 02:55PM On Mon, 17 May 2021 14:03:04 +0000 (UTC) >> ROTFL! :) >Why don't you go troll some other forum, asshole? >Just fuck off. Awwww.... _.~._ ,~'.~@~.`~. / : _..._ : \ { :,"''\\`".: } `C) 9 _ 9 (--.._,-"""-.__ ( )(@)( ) `. `-.___.-' \ ,' \ / ,` ;`-._,-. ,' ,'/ ,' `---t.,-. \_ ,--.,',' ,'----.__\ _( \----' '///,`,--.,' `-.__.--' `. ) '///,' `-` |
| MrSpook_tt7xetn_st@d3zd4ilmme.gov: May 17 02:56PM On Mon, 17 May 2021 16:06:48 +0200 >> - "= 0" nonsense for pure virtuals, t >In most OOP-languages you've to declare pure virtual functions. I'm talking about the syntax , not the concept. Wtf is "= 0"? Its an ugly syntactic hack. They already created the new keyword "virtual" so why didn't they create another one called "pure"? >> such as "class" for templates until they finally saw sense and brought in >> "typename" and implicit precedence insanities such as cout << 1 << 2; >Minor cosmetics ... Syntax matters. >> - duplicate functionality instead of extending, eg using vs typedef >That's not a problem. Syntax matters. >> - context sensitive grammar, eg blah(123) could be an object definition or a >> function call >That's not a problem. Syntax matters. >> [reasons] but static const? Go right ahead. >You can declare them as inline so you won't need a declaration in >a .cpp-file. Oh FFS. |
| Bonita Montero <Bonita.Montero@gmail.com>: May 17 05:20PM +0200 > I'm talking about the syntax , not the concept. Wtf is "= 0"? Its an ugly > syntactic hack. They already created the new keyword "virtual" so why didn't > they create another one called "pure"? That's not my fault that you don't understand pure-virtual functions. >>> "typename" and implicit precedence insanities such as cout << 1 << 2; >> Minor cosmetics ... > Syntax matters. Name me the troubles a programmer could run into because of this. >>> - duplicate functionality instead of extending, eg using vs typedef >> That's not a problem. > Syntax matters. Name me the troubles a programmer could run into because of this. >>> function call >> That's not a problem. > Syntax matters. Name me the troubles a programmer could run into because of this. >> You can declare them as inline so you won't need a declaration in >> a .cpp-file. > Oh FFS. There's a one-definition-rule which is inherited from C. This rule applies also to some other languages. But that's a perfect solution for this tiny problem. |
| MrSpook_imhoou@kq9.ac.uk: May 17 03:53PM On Mon, 17 May 2021 17:20:48 +0200 >> syntactic hack. They already created the new keyword "virtual" so why didn't >> they create another one called "pure"? >That's not my fault that you don't understand pure-virtual functions. Its not my fault you don't even appear to understand what I'm saying. Which do you think is cleaner: virtual func() = 0; or pure virtual func(); ? >> Syntax matters. >Name me the troubles a programmer could run into because of this. The only difference between most declarative programming languages is the syntax. Is there anything C++ can do that C or assembler can't? No. The reason it exists is to make life easier. Having moronic syntax has the opposite effect. >>> a .cpp-file. >> Oh FFS. >There's a one-definition-rule which is inherited from C. That rule could be enhanced. There is no good reason for this not to be legal syntax: class myclass { static int i = 123; }; >But that's a perfect solution for this tiny problem. All these "tiny" problems add up. |
| Bonita Montero <Bonita.Montero@gmail.com>: May 17 05:58PM +0200 > virtual func() = 0; > or > pure virtual func(); It's the same for me but not for compulsive personalities. > The only difference between most declarative programming languages is the > syntax. Is there anything C++ can do that C or assembler can't? No. The reason > it exists is to make life easier. Having moronic syntax has the opposite effect. That's not a practical reason. > { > static int i = 123; > }; There is a good reason because there's only one definition of i. >> But that's a perfect solution for this tiny problem. > All these "tiny" problems add up. No, they stand side by side. |
| Bonita Montero <Bonita.Montero@gmail.com>: May 17 03:30PM +0200 I don't like reverse-iterators because when converting to a forward-iterator with .base() you've to adjust it with prev() so that it points to the same object as the reverse-iterator. So I found a nice alternative: for( itQueue = m_taskQueue.end(); ; itQueue = itQPrev ) if( itQueue == m_taskQueue.begin() ) return; else if( (itQPrev = prev( itQueue))->id == queueId ) break; I need itQueue fter the loop and with what I did I don't need any additional conversions. |
| 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