05-19-2013, 09:14 PM
micheus
Thanks for the tips.
My doubts are due to Joe Armstrong saying this in Programming Erlang in a section about tail recursion:
I think I picked up the trick with the arity bump and the introduction of an accumulator from the Wings source, so there must be a reason why this is used.
By contrast, the Haskell examples I've seen don't make a fuss about using the x:myFunction xs notation, and it really does look neat.
Thanks for the tips.
My doubts are due to Joe Armstrong saying this in Programming Erlang in a section about tail recursion:
Quote:if you write a function F that never returns (such as loop()), make sure that you never call anything after calling F, and don’t use F in a list or tuple constructor.In both 1 and 2, the last expression looks like a list constructor, so it might inflate the stack noticeably if the binary is huge (I don't know for sure — no idea how these expressions would be compiled).
I think I picked up the trick with the arity bump and the introduction of an accumulator from the Wings source, so there must be a reason why this is used.
By contrast, the Haskell examples I've seen don't make a fuss about using the x:myFunction xs notation, and it really does look neat.
(05-18-2013, 06:22 AM)micheus Wrote: It's good see someone else coding for Wings3d.Well, what's the use. No one seems to be using my crap =)