3 ms·
True - and Delphi even had syntactic sugar for it so you could write stuff like: procedure WMPaint(var Msg: TWMPaint); message WM_PAINT; etc. Free Pascal al
by int_19h 1y ago
True - and Delphi even had syntactic sugar for it so you could write stuff like:
procedure WMPaint(var Msg: TWMPaint); message WM_PAINT;
etc. Free Pascal also has this, slightly generalized now so you can use strings for IDs.
But FWIW I think most people who were writing those apps back in the day didn't think of it as OOP. It was more like, one day you learned about classes and objects, and then you realized that those things you've been writing were basically about that, but with a lot more manual scaffolding.
I guess another take on this is that OOP just flows naturally from GUI problems. To this day, I still remember my first TUI app, completely handcoded in Turbo BASIC. It had a bespoke event loop, and message dispatch, and widgets; but I didn't know about any of those things at the time - it just developed organically as I went about doing the thing that I wanted to do (in that case, a simple UI for a flat file database of sorts).
- pjmlp 1y agoI was lucky to have learned multiple approaches to OOP, with TP 5.5 followed by TP 6.0 with Turbo Vision, as entry point into the world. Eventually I came to grasp the concepts, the ways it was done different across languages, and came to the realisation a very bare bones description would be to say that an object is a module you can assign to variables. Which incidently is what you get in Standard ML with functors, with polymorphism for the dispatch. Turbo Vision documentation, typing from head not going into bitsavers, actually had to guide people away from that approach you are describing to letting the framework handle those scenarios, even in MS-DOS. Ah, Turbo BASIC, my first actual BASIC compiler, and entry into being a Borland products consumer.