On 01/11/2018 05:37, Doug wrote:
I started to look at Python, but I am turned off by the necessity to indent scrupulously. I am used to the original BASIC language and Turbo PASCAL, which I like better than BASIC, since it has the CASE statement.
I hear you. I miss BASIC too, and am currently dabbling in Oberon, which is Pascal's grandchild or great-grandchild. (The family tree went Pascal → Modula (very obscure, quickly succeeded by) → Modula 2 (briefly very popular) → Oberon.
Is there a version of Python that doesn't require this nonsense,
No. It's not possible: the indentation marks the beginning and end of blocks of code, like FOR...NEXT or IF...ENDIF in BASIC. Or, more generally, Python indentation is Pascal's BEGIN...END statements. You can't do without it.
or is there a Linux Python editor that does this automatically?
No. The computer can't do it for you as it would need to read your mind, and _that_ means it would need a mind of its own to understand yours. I came to think that the indentation was a good thing. Everyone disagrees how code should be indented, and one person's clear simple logical indentation is another one's unreadable nightmare. E.g. this amusing (100% worksafe, but disturbing to C'ers) image: https://imgur.com/wG51k7v There is only one way to fix the indentation problem: *Force* everyone to use the same style. And the only way to _make_ everyone use compatible indentation is to make it meaningful, so they *have* to indent the same way as everyone else or their code won't work. Python fixes this. My suspicion is that the programmers who complain about Python indentation are the sort of people who use indentation styles that *I* find horrible and unreadable, because I find Python indentation clear and logical. But then, I don't really know Python.
(I admit that it's a few years since I last looked, and also that I don't really need it for anything, since I've been retired for 15 years or so, but I'm still interested.)
It's as good as anything today for getting back into it. But there is FreePascal, a good modern Pascal compiler for Linux and other OSes. If you have a Raspberry Pi, there's Ultibo, an embedded Pascal for fooling around with on-the-metal code. There's Oberon if you want to try something more modern -- it is both a language and an OS, and you can run the OS in a virtual machine, or as an app under Linux, or on bare metal, as you prefer. -- Liam Proven - Technical Writer, SUSE Linux s.r.o. Corso II, Křižíkova 148/34, 186-00 Praha 8 - Karlín, Czechia Email: lproven@suse.com - Office telephone: +420 284 241 084 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org