Weak Type Ability for Python

Chris Angelico rosuav at gmail.com
Thu Apr 13 20:19:03 EDT 2023


On Fri, 14 Apr 2023 at 09:49, Alan Gauld <learn2program at gmail.com> wrote:
>
> On 13/04/2023 20:35, Chris Angelico wrote:
>
> > REXX - where everything is a string,
>
> > It was quite the experience back in the day (as OS/2's native
> > scripting language),
>
> I briefly met REXX on a mainframe, but I did play with OS/2 for
> a year or two. Back when it looked like it might be a rival to M$
>
> OS/2 running NeXTstep now that would have been a platform
> for the 90s...  both so near yet so far.
>

OS/2 was the primary operating system in our house from about 1992ish
until maybe the early 2000s - possibly 2010 even, depending on how you
count things. After a while we needed to permit the occasional Windows
system due to software that didn't work, and then I started deploying
some Linux systems. Eventually the Linux boxes outnumbered the OS/2,
and finally the last OS/2 system was virtualized under Linux,
completing the transition.

But along the way, I spent many years learning the way that OS/2
works, and that's been so valuable to me ever since. The system was
built from the ground up with threads in mind, so every programmer, as
a matter of course, just learned about threads. It's that simple. Want
to make a GUI app? The rule is, you respond to a window message within
a very few milliseconds; if you can't do your processing in that much
time, you spin off a thread. Easy. VX-REXX actually did that for every
message automatically, running thread zero for the system GUI message
loop, and feeding messages to a REXX message loop; you could, of
course, still spawn your own REXX threads as needed.

The entire Presentation Manager and Workplace Shell (broadly
equivalent to a Linux "desktop manager", I think? Kinda?) were object
oriented; you would have a WPDataFile for every, well, data file, but
some of those might be subclasses of WPDataFile. And it was fairly
straight-forward to write your own subclass of WPDataFile, and there
was an API to say "if you would ever create a WPDataFile, instead
create one of my class instead". This brilliant technique allowed
anyone to enhance the desktop in any way, quite impressive especially
for its time. I've yearned for that ever since, in various systems,
although I'm aware that it would make quite a mess of Python if you
could say "class EnhancedInt(int): ..." and then "any time you would
create an int, create an EnhancedInt instead". A bit tricky to
implement.

Ahh, the memories. Clinging onto several old Realtek RTL8029 cards
long past the days when ten megabit networking was considered
adequate, because I knew that I could ALWAYS rely on them. Seriously,
those things just never gave me issues. Problems with networking? Slap
in an 8029 and see if it's the card or something else. Need to
download the driver before your network card works? Grab an 8029, boot
with that, fetch driver, try again. Good times.

ChrisA


More information about the Python-list mailing list