With a few exceptions, pointers returned by methods in Objective-C are assumed to be autoreleased. That means their reference count will be decremented at the end of the event loop.
But if OP is expecting a lifetime of learning, he might want to push a new autorelease pool for each iteration.
Or just release it. If you're sure it's autoreleased then retain/release it. If you're not sure, just set it to autorelease before you retain/release it.
retain/release on an autoreleased object won't make it get destroyed any faster. You still have to wait for the event loop to cycle (or push/pop your own autorelease pool).
Back when it was first announced, everybody made jokes about the new TeX policy and every document made using TeX will have to be reviewed before publishing :)
You can also derive the Taylor series for sin x and cos x, which are:
sin x = x - x^3/(3!) + x^5/(5!) + ...
cos x = 1 - x^2/(3!) + x^4/(4!) + ...
Therefore you can see that e^{ix} = cos x + i(sin x). Of course, I haven't shown how to derive the Taylor series (http://en.wikipedia.org/wiki/Taylor_series) for these functions, but I have to stop somewhere.
I hope that I have shown you that this isn't just an arbitrary convention, in fact far from it. The formula is so beautiful also because of the many intricate relationships between all these elementary mathematical concepts, including complex analysis, trigonometric functions, series, etc.
It should also be noted that this is just one of the many (in fact, aleph zero many) different ways to prove this equivalence.
Edit: Some formatting corrections, sorry, new here.
I can't resist not showing this clever derivation of the e Maclaurin series.
I referenced the fact that
e^x = 1 + x/1 + x^2/(2!) + x^3/(3!) + ...
Now, one of the many equivalent definitions of e is that it is the only real number for which this holds:
d/dt (e^t) = e^t
This means that e^t is a real function which is so smooth, that no matter how many times you differentiate it, you always get the same function (it turns out that it is the only such real function)
Now, we know that e^0 = 1 (since x^0 = 1, where x != 0). Therefore, in its Maclaurin series, the only term not depending on x should therefore be 1 (otherwise e^0 wouldn't be 1).
So know we know that e^x looks something like this:
e^x = 1 + (something)
Now we can ask ourselves which this question: since d/dx e^x = e^x, what must also be in the e^x series, if 1 belongs to it? Well, whatever differentiates to 1, so now we know that
e^x = 1 + x + (something)
(because d/dx (1 + x + something) = 1 + x + d/dx something)
Now we can again ask this question for our current form; what must we differentiate in order to obtain 1 + x? And thus we get
e^x = 1 + x + x^2/2 + something
This way, if we write the two (equivalent) series this way:
e^x = 1 + x + x^2/2 +
d/dx e^x = 1 + x + x^2/2 + x^3/(2*3) +
And we can complete it with the infinite Maclaurin series.
Now this is less formal than it should be and it would probably make the formalists cringe, but I hope you get the idea. You can actually apply the same principle for sin x and cos x, except in their case, they're actually mutually derived from each other. I'll leave that as an exercise for the reader (oh how fun it is to say that after reading this phrase countless times)
You don't need to. The uniqueness part of the definition is never used in that argument. (In fact, a*e^x also differentiates to itself, for any a; but that's a trivial case.)
Uniqueness almost follows from that argument. It's now easy to see that exp is the only analytic function satisfying exp' = exp and exp(0) = 1: if you have another one, by the same argument, it has the same Maclaurin expansion, hence is the same function.
However, I don't know how to prove uniqueness over all functions, not just analytic ones.
By that reasoning, a lot of math is a "convention".
The link between exponential and sinusoidal functions is of fundamental importance in many fields--obviously anything dealing with complex numbers, which is not just math but physics, electric engineering, computer graphics, and so on... and the complex definition of e^x is really the only way to define it such that it retains all its important properties in a natural way, revealing the link between trig and exponentiation. Euler's identity is fundamental, not conventional.
I wouldn't say it's "just" a convention. That implies it's arbitrary. It might look arbitrary, but it's not: for example, d/dx ((cos x + i sin x)/e^ix) = 0, as required. This doesn't hold if you pick (say) e^ix = cos x - i sin x.
Idealized Lisp Syndrome is something the read-only "fans" suffer from. Real Lispers don't see the parens, but they also don't see what the fuss is all about ..
I am a Lisper by day-job, and it too is capable of being a royal pain in the ass. Only difference is, instead of bitching about other people's code; in Lisp, I have to write the code then bitch about it :-/
I might be wrong I've been doing games in CL for some time now.