On Tue, Apr 12, 2016 at 7:56 AM, Mauro <[email protected]> wrote: > On Tue, 2016-04-12 at 13:47, Didier Verna <[email protected]> wrote: >> Mauro <[email protected]> wrote: >> >>> yes, this just binds a function to a variable. This also works: >>> >>> julia> foo() = 1 >>> foo (generic function with 1 method) >>> >>> julia> bar = foo >>> foo (generic function with 1 method) >>> >>> julia> bar = 2 >>> 2 >> >> OK, so IIUC, defining a toplevel function is not strictly equivalent >> to assigning an anonymous function to a name. Put it differently, the >> "first" name for a global function plays a particular role.
Assigning a function to a const global should be the same for the compiler. Due to jb/functions, you are not even allowed to change the const binding on 0.5, since each function has its own types and you are not allowed to change the type of a const binding (you can change the value with a warning for better REPL experience.) > > I think so. Also, note this changed quite a bit in 0.5. See > jb/functions branch.
