Re: [資訊] Guido 對 Tail Recursion Elimination …
※ 引述《yjc1 (..........)》之銘言:
: http://neopythonic.blogspot.com/2009/04/tail-recursion-elimination.html
: 解釋了這麼多年來一直沒把 TRE / TCO(Tail Call Opimization) 加到 python 的原因
: 這些理由可以理解但不太能接受… 連 lua 都 support TCO 了…
http://neopythonic.blogspot.com/2009/04/final-words-on-tail-calls.html
再次確認 TCO 無望,但後半段提到的 TCO 替代方案頗有趣
看起來還是可以硬幹,只是很醜……
這些理由中唯一可以說服我的只有 guido 對 stack frame 不能被破壞的堅持,
但個人感覺 stack frame 也沒那麼神聖不可侵犯。
而且連放到 -O 才開的方式都冠以「破壞一致性」的大義…就死心了吧…
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.113.23.212
→
04/29 01:37, , 1F
04/29 01:37, 1F
→
04/29 01:39, , 2F
04/29 01:39, 2F
推
04/29 12:11, , 3F
04/29 12:11, 3F
→
04/29 12:12, , 4F
04/29 12:12, 4F
→
04/29 18:09, , 5F
04/29 18:09, 5F
推
04/29 18:45, , 6F
04/29 18:45, 6F
→
04/29 18:48, , 7F
04/29 18:48, 7F
→
04/29 18:53, , 8F
04/29 18:53, 8F
→
04/29 18:54, , 9F
04/29 18:54, 9F
→
04/29 18:54, , 10F
04/29 18:54, 10F
推
04/29 18:57, , 11F
04/29 18:57, 11F
→
04/29 18:58, , 12F
04/29 18:58, 12F
→
04/29 19:06, , 13F
04/29 19:06, 13F
→
04/29 19:06, , 14F
04/29 19:06, 14F
→
04/29 19:34, , 15F
04/29 19:34, 15F
→
04/29 19:44, , 16F
04/29 19:44, 16F
→
04/29 20:01, , 17F
04/29 20:01, 17F
→
04/29 20:02, , 18F
04/29 20:02, 18F
推
04/29 21:02, , 19F
04/29 21:02, 19F
→
04/29 21:04, , 20F
04/29 21:04, 20F
推
04/29 21:18, , 21F
04/29 21:18, 21F
→
04/29 21:19, , 22F
04/29 21:19, 22F
→
04/29 21:20, , 23F
04/29 21:20, 23F
→
04/29 21:22, , 24F
04/29 21:22, 24F
→
04/29 21:23, , 25F
04/29 21:23, 25F
→
04/29 21:23, , 26F
04/29 21:23, 26F
→
04/29 21:24, , 27F
04/29 21:24, 27F
推
04/29 21:25, , 28F
04/29 21:25, 28F
→
04/29 21:26, , 29F
04/29 21:26, 29F
→
04/29 21:27, , 30F
04/29 21:27, 30F
→
04/29 21:34, , 31F
04/29 21:34, 31F
→
04/29 23:18, , 32F
04/29 23:18, 32F
→
04/30 00:00, , 33F
04/30 00:00, 33F
→
04/30 00:00, , 34F
04/30 00:00, 34F
→
04/30 00:02, , 35F
04/30 00:02, 35F
→
04/30 00:04, , 36F
04/30 00:04, 36F
→
04/30 00:04, , 37F
04/30 00:04, 37F
→
04/30 00:10, , 38F
04/30 00:10, 38F
→
04/30 00:11, , 39F
04/30 00:11, 39F
推
04/30 00:29, , 40F
04/30 00:29, 40F
→
04/30 00:32, , 41F
04/30 00:32, 41F
推
04/30 01:04, , 42F
04/30 01:04, 42F
→
04/30 01:05, , 43F
04/30 01:05, 43F
→
04/30 01:16, , 44F
04/30 01:16, 44F
→
04/30 01:25, , 45F
04/30 01:25, 45F
→
04/30 01:25, , 46F
04/30 01:25, 46F
→
04/30 01:27, , 47F
04/30 01:27, 47F
→
04/30 01:32, , 48F
04/30 01:32, 48F
→
04/30 02:35, , 49F
04/30 02:35, 49F
→
04/30 03:07, , 50F
04/30 03:07, 50F
→
04/30 03:22, , 51F
04/30 03:22, 51F
→
04/30 10:22, , 52F
04/30 10:22, 52F
→
04/30 10:23, , 53F
04/30 10:23, 53F
推
04/30 15:04, , 54F
04/30 15:04, 54F
→
04/30 15:05, , 55F
04/30 15:05, 55F
推
05/04 12:17, , 56F
05/04 12:17, 56F
→
05/04 12:17, , 57F
05/04 12:17, 57F
→
05/04 12:18, , 58F
05/04 12:18, 58F
→
05/04 12:18, , 59F
05/04 12:18, 59F
→
05/04 12:19, , 60F
05/04 12:19, 60F
→
05/04 12:20, , 61F
05/04 12:20, 61F
→
05/04 21:57, , 62F
05/04 21:57, 62F
→
05/04 22:01, , 63F
05/04 22:01, 63F
→
05/04 22:59, , 64F
05/04 22:59, 64F
→
05/04 23:00, , 65F
05/04 23:00, 65F
推
05/05 00:19, , 66F
05/05 00:19, 66F
→
05/05 21:17, , 67F
05/05 21:17, 67F
→
05/05 21:18, , 68F
05/05 21:18, 68F
→
05/05 21:19, , 69F
05/05 21:19, 69F
→
05/05 22:45, , 70F
05/05 22:45, 70F
→
05/05 22:46, , 71F
05/05 22:46, 71F
→
05/05 22:46, , 72F
05/05 22:46, 72F
→
05/05 23:05, , 73F
05/05 23:05, 73F
→
05/05 23:06, , 74F
05/05 23:06, 74F
→
05/05 23:06, , 75F
05/05 23:06, 75F
討論串 (同標題文章)
以下文章回應了本文 (最舊先):
完整討論串 (本文為第 1 之 3 篇):
Python 近期熱門文章
PTT數位生活區 即時熱門文章