From: matz@... Date: 2016-07-19T09:10:52+00:00 Subject: [ruby-core:76440] [Ruby trunk Feature#12543][Closed] explicit tail call syntax: foo() then return Issue #12543 has been updated by Yukihiro Matsumoto. Status changed from Open to Closed I am not positive. This may not work under tracing. I am for adding tail-call optimization, but Koichi do not love the idea either. Matz. ---------------------------------------- Feature #12543: explicit tail call syntax: foo() then return https://bugs.ruby-lang.org/issues/12543#change-59686 * Author: Yusuke Endoh * Status: Closed * Priority: Normal * Assignee: Yukihiro Matsumoto ---------------------------------------- How about introducing a new syntax for tail call? ``` def foo() foo() end foo() #=> stack level too deep ``` ``` def bar() bar() then return end bar() #=> infinite loop ``` * no new keyword (cf. `goto foo()`) * no conflict with any existing syntax * an experimental patch is available (attached) * no shift/reduce nor reduce/reduce conflict in parse.y -- Yusuke Endoh ---Files-------------------------------- then_return.patch (9.18 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: