--f46d04170345d7f11e04b02d47dc Content-Type: text/plain; charset=ISO-8859-1 On Tue, Oct 25, 2011 at 5:27 PM, Joshua Ballanco <jballanc / gmail.com> wrote: > On Tue, Oct 25, 2011 at 5:16 PM, Charles Oliver Nutter < > headius / headius.com> wrote: > >> > Does anyone have statistics on how often binding is used and what the >> costs >> > is for not optimizing those portions? >> > >> > Binding in Ruby is used by debuggers or other dynamic introspection >> tools to >> > give access to call stack objects. There are dynamic languages such as >> Perl >> > and some of the POSIX shells (bash and zsh but not more recent ksh) that >> > don't have something like binding; therefore debuggers in those >> languages >> > can't provide reliable info regarding certain variables on the call >> stack >> > other than the top-most frame. >> > >> > Does it matter? Some probably would argue it doesn't. I think access to >> > locals on the call stack in a debugger is nice to have. >> >> That is neither here nor there. I am not proposing removing bindings. >> >> What I am proposing is removal of the ability to use an arbitrary Proc >> as a binding. Right now, millions of Ruby developers are passing >> blocks around, blissfully unaware that they are exposing *all* state >> that surrounds the block to the called code. Please read my example >> again. >> > > This was the subject matter of my RubyConf talk. You can view the video > here: http://confreaks.net/videos/671-rubyconf2011-keeping-ruby-reasonable. If you skip to 19:33, I presented a very real example of how this property > of Proc#bindings can have an impact on performance. > Good talk! --f46d04170345d7f11e04b02d47dc Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <br><br><div class="gmail_quote">On Tue, Oct 25, 2011 at 5:27 PM, Joshua Ballanco <span dir="ltr"><jballanc / gmail.com></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> <div class="gmail_quote"><div class="im">On Tue, Oct 25, 2011 at 5:16 PM, Charles Oliver Nutter <span dir="ltr"><<a href="mailto:headius / headius.com" target="_blank">headius / headius.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1pxccc solid;padding-left:1ex"> <div>> Does anyone have statistics on how often binding is used and whathe costs</div><div> > is for not optimizing those portions?<br> ><br> > Binding in Ruby is used by debuggers or other dynamic introspection tools to<br> > give access to call stack objects. There are dynamic languages such aserl<br> > and some of the POSIX shells (bash and zsh but not more recent ksh) that<br> > don't have something like binding; therefore debuggers in those languages<br> > can't provide reliable info regarding certain variables on the call stack<br> > other than the top-most frame.<br> ><br> > Does it matter? Some probably would argue it doesn't. I think access to<br> > locals on the call stack in a debugger is nice to have.<br> <br> </div>That is neither here nor there. I am not proposing removing bindings.<br> <br> What I am proposing is removal of the ability to use an arbitrary Proc<br> as a binding. Right now, millions of Ruby developers are passing<br> blocks around, blissfully unaware that they are exposing *all* state<br> that surrounds the block to the called code. Please read my example<br> again.<br></blockquote><div><br></div></div><div>This was the subject matter of my RubyConf talk. You can view the video here: <a href="http://confreaks.net/videos/671-rubyconf2011-keeping-ruby-reasonable" target="_blank">http://confreaks.net/videos/671-rubyconf2011-keeping-ruby-reasonable</a> .f you skip to 19:33, I presented a very real example of how this propertyf Proc#bindings can have an impact on performance.</div> </div></blockquote><div><br>Good talk! <br></div></div><br> --f46d04170345d7f11e04b02d47dc--