Linked by Thom Holwerda on Sun 12th Aug 2012 22:16 UTC
General Development "I cannot help but speculate on how the software on the Curiosity rover has been constructed. We know that most of the code is written in C and that it comprises 2.5 Megalines of code, roughly. One may wonder why it is possible to write such a complex system and have it work. This is the Erlang programmers view."
Permalink for comment 530953
To read all comments associated with this story, please click here.
RE[2]: How
by viton on Mon 13th Aug 2012 16:04 UTC in reply to "RE: How"
Member since:

as some very powerful data structures require recursion to be implemented efficiently (trees anyone?)

Recursion cannot be checked statically.
You can emulate recursion iteratively with custom controlled stack. It will also be faster on RISC architectures. Recursion is dangerous (it could break through the limits of allocated stack for example)

As they can lead to worse and buggier code (see the recursion example above).
Bad example. Recursion (via recursive calls to itself) doesn't work nice with modern hardware anyway.

Reply Parent Score: 2