A 26/03/2013, às 22:31, James Surgenor escreveu:
> Hi all,
>
> This is going to be a completely random question that I should know that answer to, but still, SCDocs aren't helping.
>
> I've been spending ages in other languages recently, and returning to SC is becoming pretty strange - most languages seem to have convenience methods (++ and += etc), and SC doesn't, but is there a reason for this or am I just being stupid?
I don’t know if all imperative languages have ++ or not, but certainly none of the functional languages have them and SuperCollider is mostly imperative but with functional influences. Using those kind of operators is hardcore low level imperative style, SuperCollider generally operates at a higher level then that. For instance you’ll see them used a lot in c in for loops, but for loops are to be avoided in SuperCollider, instead one should use the collect method which corresponds to the classical ‘map’ function from functional programming, which uses anonymous functions something which is not possible to do in c. You should see using ++ and += a bit as writing assembly code, it’s not something you should want to be doing if you can avoid it (and you can).
best,
Miguel