IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Why the hell would it do / allow that?
Would anyone like to jump in and say that's not brain damaged? Anyone?
===

Purveyor of Doc Hope's [link|http://DocHope.com|fresh-baked dog biscuits and pet treats].
[link|http://DocHope.com|http://DocHope.com]
New Bell labs has an unlimited crack budget
It has its uses. Here's one.

class G {}

class F
{
G _g; // private member g
public:
G& g() { return _g; } // if we are not const, then neither is our G
const G& g() {return _g; } // if we are const, so is our G
};

So the rule is, if the F is const then you can't mess with the G. But if its not, than you can mess with the G.

Notice that I have to write a bunch of boilerplate to extend the const bubble around the F to cover the G by overloading the g member on const. This is what I dislike about C++. You get this idea that the world should be surrounded by safety rails and you spend your whole life filling in the gaps to make sure that the safety rails cover as much ground as possible - all at the expense of writing code that just does something.




[link|http://www.blackbagops.net|Black Bag Operations Log]

[link|http://www.objectiveclips.com|Artificial Intelligence]

[link|http://www.badpage.info/seaside/html|Scrutinizer]
     C++ question on const - (ChrisR) - (24)
         Don't change the object, I believe - (JayMehaffey) - (2)
             Doh. - (ChrisR) - (1)
                 More than that... - (jb4)
         Re: C++ question on const - (tuberculosis) - (20)
             I still don't understand... - (ChrisR) - (19)
                 Const is not always forced - (JayMehaffey)
                 Its counterintuitive - (tuberculosis) - (14)
                     Say WHAT?!? - (jb4) - (13)
                         You can overload on const - (tuberculosis) - (11)
                             Why the hell would it do / allow that? - (drewk) - (1)
                                 Bell labs has an unlimited crack budget - (tuberculosis)
                             The easiness to keep track of is not the issue - (jb4) - (8)
                                 Huh? - (tuberculosis) - (7)
                                     No... - (jb4) - (6)
                                         I think you're talking past each other... - (admin)
                                         And you specify that by.... - (tuberculosis) - (4)
                                             We'll leave it at that. - (jb4) - (3)
                                                 I wasn't trying to be sarcastic - (tuberculosis) - (2)
                                                     No need to specify OO in this case - (JayMehaffey)
                                                     What does the type of the reference have to do with anything - (jb4)
                         Nominating this for LRPD (new thread) - (lincoln)
                 Re: I still don't understand... - (jb4) - (2)
                     Which brings up another question. - (ChrisR) - (1)
                         Pure virtual functions - (tuberculosis)

Gifts to acquaintances and coworkers should be delivered with as much warmth and sincerity as you can fake.
88 ms