Encapsulation is not solely an OOP idea, it's also a modular programming thing. That many languages lack proper module support is a whole other matter.
But there are many advantages to doing encapsulation through modules over classes, if nothing else being able to have the internal functions organized in different files, and having "internal"/"external" functions have the exact same syntax without needing hacks like extension methods.
But there are many advantages to doing encapsulation through modules over classes, if nothing else being able to have the internal functions organized in different files, and having "internal"/"external" functions have the exact same syntax without needing hacks like extension methods.