On Wed, May 13, 2009 at 7:56 PM, Tracy Harms <[email protected]> wrote:

> Thank you for confirming what I had initially understood to be the
> case, that (to date) J has not exploited tail recursion. My confidence
> is bolstered that J therefore stands as disproof of the idea, common
> in some circles, that in order to be a "serious" "functional" language
> a programming language must implement tail recursion optimization.
>
J has loop construct and is not pure so not having TCO is not much an issue
as there are alternatives. For a functional language that is pure like
Haskell, no TCO may make certain algorithm very difficult to implement if
not impossible.

That said, I seldom use recursion in Haskell but most likely some form
of foldl or foldr. This is also the case I found in Python or F#.

So if by 'serious' you mean coding in 'pure' style(i.e. no fallback to
loop), I am curious to know how can one implement algorithms that needs
recursion in J.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to