Mauro <[email protected]> wrote:

> On Tue, 2016-04-12 at 11:10, Didier Verna <[email protected]> wrote:
>>   Hello,
>>
>> I'm wondering if anyone has ever seen an actual use for dynamically
>> creating a new global variable by using the "global" keyword from
>> within a local scope?
>
> https://github.com/JuliaLang/julia/blob/6b5a05eb1a029aef93f77b60bb1d745c7d6e1d8d/base/managers.jl#L175

  Thanks, but :-). Two comments (related):

1. in that particular case, you're doing it not really because you want
   to dynamically define your global function, but because you need the
   lexical closure (your let is at the top-level). How about
   non-functional variables?

2. also, technically, your lexical closure isn't required for the
   function itself, but for the particular method you're defining. But I
   guess there's no way of declaring an empty generic function?

-- 
ELS'16 registration open! http://www.european-lisp-symposium.org

Lisp, Jazz, Aïkido: http://www.didierverna.info

Reply via email to