Many years ago when I didn't know much about object oriented design I heard one guy said something like "How can you write a text editor without polymorphism?" I didn't know much about OOP and so I couldn't judge how wise that though was or ask any specific questions at that time.
Now, after many years of software development (mostly C++), I've used polymorphism many times to solve various problems when designing software. Yet I've never created text editors. So I still can't evaluate that guy's idea.
Is using polymorphism so essential for implementing a text editor in object-oriented languages and why?
Polymorphism for writing a text editor is by no means essential. In fact, polymorphism for solving any programming problem is not essential. It's just one way to do it. Sometimes it makes solving certain kinds of problems easier, and sometimes it just gets in the way.
The evidence for this is that there are perfectly usable text editors developed long before "OOP" became popular.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With