< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事(自分と同じ返事先を持つ)
N :次の記事
|<:スレッドの先頭
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
Hi,
2008/12/4 Robert Dober <robert.dober / gmail.com>:
> Hi list
>
> I was just having some real fun with the 191p2 and somehow I was sure
> that tail recursion would be optimized away, but alas....
> I than searched the list for any information on that and did not find anything.
> Did I only dream or am I correct in assuming that Ruby1.9 will
> eventually optimize tail recursions?
YARV itself implements tail call optimization, but the feature is currently
disabled by default. I guess this is because, if it is enabled,
- stack trace will change (and become harder to read), and
- set_trace_func cannot hook an event of method return.
But I also want tail call optimization in some cases. I think a new method
call syntax or feature may be needed to declare that the call is tail call
and should be optimized. For example, how about Method#tail_call:
def foo
...
method(:foo).tail_call
end
--
Yusuke ENDOH <mame / tsg.ne.jp>