So can you give me a list of languages that do/don't eliminate tail recursion automatically? Do you have that list memorized? What gcc versions? MSVC? How about java (some JVM's can, some can't). Does Fortran? What about pascal? COBOL? Python (doesn't)? Where are the efficiency tradeoffs in those various language? Is tail recursion ever faster? (never). How does Perl handle it? What about Ruby? One really can't keep this straight -- especially if you don't confine yourself to a very narrow field of languages. All the more reason to be explicit.
This also goes back to my earlier comments about being blunt and forthright with code. Tail-recursion isn't natural in this case. In math, it's natural, but where a loop applies, use the loop. So why do it? What is the value there?
Again, like the other argument, our neurons are wired differently and I doubt we will reach agreement.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||