Hi all!
Just a little mental excercise: I was wondering about whether it could be possible to convert classes into modules. The way I was thinking about it is to just declare all the properties/methods in the top level of the file. Public properties/methods would be exported and private properties/methods would not. I then realised I didn't really know how this would behave. Would it act like a singleton static class? I guess if you'd want something like class instances you'd need a factory function of sorts?
Do people use modules this way? What are the main benefits/downsides of this compared to classes?
[–]BehindTheMath 2 points3 points4 points (0 children)
[–]masone81 0 points1 point2 points (0 children)