The basic idea is that script-local functions are defined at the script
level. And not created or deleted dynamically.
The main reason is that in a compiled :def function these script
functions can be called by index, instead of having to look them up by
name (and handle failure). That is more efficient and allows for type
checking of arguments and return value.
Currently this function lookup by index only happens for :def functions,
but it could also be done for legacy functions. Applying the same rule
for both type of functions is more consistent anyway.
--
Time is an illusion. Lunchtime doubly so.
-- Ford Prefect, in Douglas Adams'
"The Hitchhiker's Guide to the Galaxy"
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///