4 ms·
You might even say that without classes python would be a simpler language, while keeping almost all its power :)
by iwwr 5y ago
You might even say that without classes python would be a simpler language, while keeping almost all its power :)
- btown 5y agoIt's a fun dream, but without the ability for a variable to carry along with it a notion of, say, how it implements slice notation, or the ability to avoid verbose names like foo_to_repr(foo) and bar_to_repr(bar) so that names don't collide... arguably we never would have seen the rise of scientific Python! Object oriented programming is an incredibly good abstraction for a lot of real-world scenarios.