3 ms·
Most of the old discourse around the video turned into debates about OOP vs functional programming, but I feel like those debates alway make a mistake conflatin
by parpfish 4y ago
Most of the old discourse around the video turned into debates about OOP vs functional programming, but I feel like those debates alway make a mistake conflating "using classes" with OOP.
Sure, classes can be used to build 'objects' in an OOP paradigm that have lots of methods and attributes that store state and all that.
But if you instead think of classes as a simple way of extending the type system (e.g., the aforementioned dataclasses), defining classes can fit in really nicely with a functional programming paradigm by cleaning up function signatures. However, the benefits of this wouldn't have been visible in python 10 years ago because there was little/no typing.
- PaulHoule 4y agoYep. I code a lot in Java and in Python and my experience in one informs the other and I particularly like seeing parallel developments in the two languages. In the case of Java I quite like how records and sealed classes can take the role of sum and product types from FP.