[MacRuby-devel] [MacRuby] #528: Improve Tail Call Elimination
Jordan K. Hubbard
jkh at apple.com
Thu Dec 31 20:39:43 PST 2009
I have to say - Trac seems to be a rather bad way of having architectural discussions. I've been having a hard time even understanding who says what for the last 2-3 rounds of comments. Wouldn't this be a better sort of discussion to have on the -devel mailing list, then distilling the action items (if any) into the Trac bug?
Just a thought... Happy New Year everyone!
- Jordan
On Dec 31, 2009, at 8:23 PM, MacRuby wrote:
> #528: Improve Tail Call Elimination
> -------------------------------------+--------------------------------------
> Reporter: haruki.zaemon@… | Owner: lsansonetti@…
> Type: enhancement | Status: new
> Priority: minor | Milestone:
> Component: MacRuby | Keywords: tail call elimination optimisation tco
> -------------------------------------+--------------------------------------
>
> Comment(by haruki.zaemon@…):
>
> Replying to [comment:7 conradwt@…]:
>> If you need tail call optimization, then you're definitely concerned
> about the wasteful calls because the goal of tail call optimization is to
> transform
>> recursive alogithm into iterative algorithm.
>
> The aim of TCO is to allow recursive algorithms to perform within a
> constrained stack frame. Whether you choose to implement this as re-
> writing the algorithm iteratively or instead throwing away the stack frame
> is a choice.
>
>> I guess that you're looking for something automatically done with
> MacRuby VM.
>
> I don't mind if it's explicit :)
>
>> It's still your requirement to implement the appropriate traversal
> algorithm for the data set that you're operating on. In short, one should
> use the best algorithm for the job and not rely so heavily on what's
> happening within the language's internals.
>
> And I have, twice: once recursively; then again iteratively actually make
> it perform. The former being MUCH simpler, the latter being horribly
> complex.
>
> I I'm not accusing MacRuby of being flawed, I'm merely suggesting that, as
> per the links posted, OO algorithms and data structures can be greatly
> improved by languages that support TCO. Yes, it's possible to write
> complex algorithms without TCO; it's also much easier to write them with
> it.
>
> --
> Ticket URL: <http://www.macruby.org/trac/ticket/528#comment:9>
> MacRuby <http://macruby.org/>
>
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
More information about the MacRuby-devel
mailing list