| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13
Comments:
<0> yea heh <1> i wanted to see if anyone got it <1> hahaha <0> hahah <1> MrAshe, yuo think that will overwhelm him? heh <2> I just think they're not related <1> Cowmoo, are you an arab-language speaker or did you google for that? ;) <0> native speaker <1> cool <0> you? <1> MrAshe, they aren't related? at all? how do you figure? <1> i mean they are orthogonal concepts, sure <1> but i ***ure you they are relateable/related for at least one meaning of the world related <1> Cowmoo, i'm not arabic at all, don't know the language, i just think arabic script looks pretty ;) <0> haha, great <2> int const, T const *
<2> No reference, const <2> Go figure <2> Using const where needed and using references where needed is not related, that's all <3> probably why cleaning memory... <2> Weird people using alloca <2> OSVERSIONINFO osvi; <2> There, not needed anymore <3> please advise <1> MrAshe, i think you are using a very narrow definition of the word 'related' <2> Ok, then float and mutable are related, they're in the same language <1> yep <1> sure are related <2> Kind of like MmmCake and dumb*** <2> But there the relationship is much closer <1> riight <1> clever <1> you are a witty person <1> anyway const and references/pointers is related when it comes to function prototypes <2> Like arrays, templates and throw specifications <1> because it is kind of dumb to do: int foo(int param); whereas int foo(const int & param) makes more sense <2> Actually, the second one is plain stupid <1> heh that's true <1> ok replace int with MyCl*** <1> sorry <1> i am retarded <1> nevermind <1> int foo(MyCl*** arg) <-- a little heavy, weird, and retarded? <1> int foo(const MyCl*** & arg) <--- better <2> It'd be the same without the const, as far as "heaviness" is concerned <1> int foo(const MyCl*** arg) <-- really retarded <2> So, const and reference, different things <2> He needs to learn how to use const properly <2> He needs to learn how to use references properly <2> Two things, distinct <1> they are not that distinct <1> the whole reason why you const the reference is because it is a reference and you are saying to the outside world "hey don't worry i won't modify the thing you are giving me!" <4> once a const is set right.. it cant be changed to refer to another object, so what would be the point of saying.. say... int foo(MyCl*** const & arg) ? :o <1> if you leave out the const, you are saying "hey thansk for the reference, i *will* be changing this most likely" <2> A non-const reference can't be changed to refer to another object either <4> yeah <1> Antrix, well the point is yo are saying to the outside world "within this function I won't be changing your object" <1> so, MrAshe, i reiterate: const and references go well together, they are related in a fairly narrow sense of the word 'related' <4> but what i put above sets the reference itself as constant... could u not still change the object the reference refers to ? <2> Just like mutable and references go well together <2> Or register <2> Or static <1> Antrix, actually you are incorrect.. const is tricky to read.. <4> so <2> Then const works just the same with pointers, so.. <1> MrAshe, obviously you lack the mental plasticity to understand my argument, therefore i will drop it. but you are wrong and I am right! HA! <4> int foo(const MyCl*** & arg) == int foo(MyCl*** const & arg) <4> ?? <2> You can't be right, since I can ban you, duh <2> (weird people) <4> oh crap!!! <4> lol! <1> Antrix, yes, the two are equivalent <2> And MyCl*** const & is more right <4> man...
<4> ok <1> MrAshe, that is where you are wrong: i can be both banned and right. that is an incorrect ***ertion. <4> but <2> I could make a bad joke about being conservative, but I don't know if right is conservative or not <5> MrAshe: like because it's placed to the right? <2> Yes <2> It wouldn't be more left if it got placed to the left though <2> Or would it be <2> Hmm <4> lol <1> haha <4> but seriously, which one is best to use? if they are logically equalent :o <2> T const <4> and why allow both <2> It works only for the left most <1> Antrix, take it up with Kernighan.. or maybe Ritchie.. the bastards <2> T const * const * const * const p; <= always on the right <4> yeah gonna have some words with that man <2> And you can read it right to left that way <2> Not like you need to read it cause it's plain obvious by looking at it, but still <1> MrAshe, yeah it's as obvious as obfuscated perl <1> to someone who is just learning <2> Someone who's not learning wouldn't type such a thing, except maybe Run, but Run likes people with blue hair, so who knows <4> its as clear as a sega megadrive emulater written in brain**** and then encrypted using a 128 bit algorithm <4> emulator* <4> blue hair?? <2> ..++>,++++,+++++++++++++++>>--+.., <2> Like this? <1> yeah, and you mean AFTER losing the encryption key <2> (yes, it's efficient, only few instructions) <4> thats quite impressive <1> MrAshe, is that valid C++?! <1> or perl? <2> Nope, it's valid brain**** <1> ah <1> heh <2> But you can easily do something similar in C++ by overloading operators <4> does it play dreamcast games as well ? <1> anyway antrix pay no attention to mrashe who is tyring to confuse you -- he hates to admit it but const and references go well together.. like love and marriage it's a relationship you can't disparage <2> Have --, ++, *, ! and whatever return a T&, and --*!++etcetc++p; works fine <2> I'll make it simple for you MmmCake <2> When do you p*** a T &? <1> when you are promising to modify the T, or when you are a student that didn't learn const yet <4> i understand all the main concept, its just some way things are done in c++ (e.g. those two statements being logically equalent) which puts me off sometimes <2> "that didn't learn const yet" <2> See, no reference <2> I won't even have to type more, thanks <1> i think you are making a logical error <1> p -> q doesn't mean p <-> q <2> T& and T const & <2> T* and T const * <2> What's the common point, references, or const? <2> Oh wait, it's const, amazing! <1> they are both references <2> No, they're not <2> And I wonder why books have a chapter about const and one about reference, and not one about both at the same time <1> yes, and in the chapter about const, you will find examples of why const is useful, and the very reason why it's useful is because it is a way to promise to the outside world that you will not be modifying the contents of a pointer or a reference DUH <1> (among other reasons why it's useful) <2> So, different concept, excellent <1> i never said they are the same concept <2> Btw don't forget a pointer is not a reference, that could be useful <1> i said they are related <4> brb i'm writing the matrix <1> you can think of a pointer as a more powerful sort of reference <2> Except it's not <1> yes it is <6> they're not related <1> yes they are <2> Wonder how p***ing by value is related to references <2> Go figure <4> how about... a constant pointer and a reference.. they both relate to a piece of data and neither of them can be changed.. the pointer contains the memory location of the value, but what does the reference contain? <2> Whatever the compiler decides <4> but surely that has to be a memory location to ? <1> Antrix, don't let anyone know i told you, but internally really a reference and a pointer are the same thing they just have different syntax
Return to
#c++ or Go to some related
logs:
#chatzone #linux totem decoders fedora browseatwork.net #linux default password for deepfreeze
You must accept Sun's EULA prior to successfully installing this package openser ubuntu binary ubuntu GLX_EXT_texture_from_pixmap is missing no wireless networks found.
|
|