Hi Ron!
My dislike of Python is roughly threefold:
- The architecture;
- The "duck-typing";
- The syntax.
(1) The architecture
If you install Python, it's splattered all around the disk. Adding new modules requires some murky import command. Making a byte code image requires a PhD. Hence, distributing a plain Python application is a pain in the neck.
Although Python has a VM as well (like 4tH) IT IS INCREDIBLY SLOW.
There is a reason 4tH is a single file application. I didn't want a complex installation. You want to run (basic) 4tH, you got ONE executable. You want to run a 4tH application?
(1) Distribute the executable with a bytecode image;
(2) Distribute the executable with a preprocessed source;
(3) Make a true, native executable.
The latter one is even doable IMHO if you don't know C at all.
(2) Duck typing
Duck typing requires a language to make decisions better left to the programmer. Duck typing is based on the assumption it makes life easier for the programmer - even beginners. I tend to disagree. In certain circumstances, the language is forced to make decisions which are incomprehensible to the ordinary user - and aren't even fixable without deep technical knowledge. As a programmer who've been in several fights with SQL "optimizers" I know what I'm talking about.
I personally think it's better to have a "dumb" language with commands that simply do what is written on the can than one that is overly "clever". Predictability is a bliss for beginners. I consider 4tH a perfect language for those beginning Forth. Not necessarily a good language for absolute beginners. uBasic would be a much better candidate for that. Especially since it's now almost full featured.
(3)
Don't start me on this one.
- Yeah, it might seem neat to force a programmer to lay out his code properly. But it may also introduce hard to find bugs.
- If you need a trailing comma to distinguish a tuple from e.g. a string, you've not thought out your syntax properly;
- Printing something without a LF is already murky in Bash, but in Python it's just syntax horror pur sang;
- There is no proper way to make methods private. All it has is more and more and uglier and uglier kludges;
- Underscores and more underscores show the hideous way Python works under the hood. It's completely unreadable in a language that should be completely readable;
- The 'walrus' operator just shows how the creator himself doesn't understand his own language - and is willing to violate his most basic architecture and principles.
That's why I don't like Python.
Yes, and I still do like Basic. It was my first language and my primary language during the eighties. I did have a little love affair with Turbo Pascal - some of its features found their way into 4tH, but in the end it was just too limited and awkward for my taste. Turbo C v2 was a much longer lasting love-affair. Pascal on steroids! 4tH started there, actually. I did add some syntax changes to make it look a bit more like Pascal (using the preprocessor - I picked up that idea from Byte Magazine), but I abandoned that "EasyC" in the early 2000's. You should find that in the changelog of 4tH.
Hans Bezemer