The syntax to make an empty generic function wasn't added until v0.4, so that may be why older code uses global.
On Tuesday, April 12, 2016 at 8:05:36 AM UTC-4, Didier Verna wrote: > > Mauro <maur...@runbox.com <javascript:>> wrote: > > > If I understand correctly, you argue that all global bindings should > > be declared in the (lexical) global scope. An inner scope could then > > use that binding by using `global`. But new global bindings could not > > be created in local scopes. I think that would functionally be > > equivalent to the current status. I have no feeling about which would > > be superior syntactically. > > Right. It's the implicit creation of new bindings that I dislike. Or > rather, the fact that sometimes new bindings are created, sometimes > not, depending on the context. > > >> 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? > > > > function foo end > > Oh! So, it's exactly that. Your previous example: > > let tunnel_port = 9201 > global next_tunnel_port > function next_tunnel_port() > # ... > end > end > > can actually also be written like this: > > function next_tunnel_port end > let tunnel_port = 9201 > function next_tunnel_port() > # ... > end > end > > > -- > ELS'16 registration open! http://www.european-lisp-symposium.org > > Lisp, Jazz, Aïkido: http://www.didierverna.info >