I don't know what would be the cost of it during compilation time or how 
difficult would be to implement it, but at first sight I think it could be 
a nice idea to allow defining functions inside other function bodies. Just 
like in Scala (https://www.scala-lang.org/old/node/116.html), nested 
functions would be in scope only for parent functions.

I think it would improve readability to be able to encapsulate those "def 
do_work" functions within its related "def work" function. Maybe, to avoid 
crazy things, we could limit the allowed nesting deep to just 2.

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/5c89cded-89a6-4ea5-befd-039d391c879b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to