Peccavi. (I have Sind.)
Sep. 20th, 2004 09:06 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Thoughts on a Monday night.
- It's been too long since I went to a movie.
- It's been too long since I had anyone to go to a movie with.
- Bushmills apparently triggers the bitter receptors on my tongue, since Diet Coke tastes like candy immediately after a sip of Bushmills.
- Maybe it's sour. Not my field of study.
- You can tell it's a slow night when my main object of inquiry is "does the distinction between pre-increment (++i) and post-increment (i++) matter anywhere except during assignments and function calls?".
no subject
Date: 2004-09-20 08:48 pm (UTC)no subject
Date: 2004-09-21 12:13 am (UTC)However, under the hood, there's one big difference when you're worried about memory, especially when using the ++/-- operators with bigger types than ints:
Since the postfix version returns the value of i, *then* increments, it actually returns a copy of i, then increments i, so that the expression will still get the old value of i. When you use the prefix, the new value is being returned, so everything just happens *to i* in place.
Not a huge deal unless you're worried about memory, or you implement ++ or -- for a particlaryly large class/struct, and aren't thinking about behind-the-scenes copying.
Other than that, it's all really which value of i you want. :)
no subject
Date: 2004-09-21 05:51 am (UTC)Must find coffee now.