From: Matthew Kerwin Date: 2016-11-19T10:02:15+10:00 Subject: [ruby-core:78209] Re: [Ruby trunk Feature#12901] Anonymous functions without scope lookup overhead On 19/11/2016, justcolin@gmail.com wrote: > Issue #12901 has been updated by Colin Fulton. > > This would be a fantastic feature. I second the idea of something like > `function { }`, `func { }`, `<> { }`, `--> { }`, `->> { }`, or `<-> { }`. > > Would these behave like regular Procs or lambda Procs when it comes to > return semantics and arty checking? I personally think it would be useful to > have both types, but having four variants of anonymous functions in Ruby > might be a bit overwrought. > I think it makes sense and would be useful for a 'function' to have strict arity checking and return from the anonymous function, like a lambda or a method. -- Matthew Kerwin http://matthew.kerwin.net.au/ Unsubscribe: