So basically make a file like an object? :slightly...
# language-proposals
o
So basically make a file like an object? 🙂
r
Huh, I guess that is basically what I'm asking, isn't it. I'm mostly interested in the constructor part, though it's really not a big deal.
d
There's a potential problem with accidental overrides in Java, same as with
internal
. For
internal
it is resolved with name mangling, which is a kinda compromise.
r
Hm, it seems I haven't really thought this proposal through. It seems most of my proposals seem like a good idea at the time, but end up being anything but on closer inspection.
b
Swift has this and it's very useful for nested functions that have to be called from extension functions or private classes