3 ms·
It is a very nice feature. As far as I know, it is a common pattern in Scala and I also do it in Julia (although there might be some small performance penalty).
by amval 4y ago
It is a very nice feature. As far as I know, it is a common pattern in Scala and I also do it in Julia (although there might be some small performance penalty).
It just makes complex code much more readable without polluting the module's scope.
So I am not sure how common it is, but there are at least some languages that allow this.