3 ms·
Exactly! I find myself writing out the same code with classes and functions to show this to folks. I still prefer using classes as it’s easier for me to see at
by slively 3y ago
Exactly! I find myself writing out the same code with classes and functions to show this to folks. I still prefer using classes as it’s easier for me to see at a glance that constructor = DI/curry vs a function returning an object of functions or something. So a class is just a way to communicate a pattern.
- galbar 3y agoI have definitely had the whole "what is the difference between this class <class with constructor and one method> and this function that receives the same as the class constructor returns a function implementing the method" conversation with my teammates before!