judofyr / timeless

A mixture of a blog, wiki and CMS, inspired by Christoffer Sawicki's Termos and James Adam's Vanilla.rb
http://timeless.judofyr.net/
Other
115 stars 14 forks source link

Write about closures in Ruby #48

Open judofyr opened 13 years ago

judofyr commented 13 years ago

21:33 zzak: do a post on closure in ruby 21:33 zzak: naow 21:33 zzak: :} 21:34 Judofyr: heh, what about closures? :-) 21:34 zzak: well for starters 21:35 zzak: why when you use a Proc, you can return from within that proc and that will continue beyond the lexical scope 21:35 zzak: but lambda's dont 21:35 zzak: whats the best way to use closure in ruby 21:35 zzak: what are the disadvantages to using it, etc 21:37 zzak: why are theere multiple ways to create a closure in ruby? 21:37 zzak: what differences exist between them 21:38 zzak: i like how javascript has only one real way 21:38 zzak: what other languages does ruby relate to as far as closures?