Conversation

language seems to me like an invention of lazy programmers, who got bored by writing BEGIN all the time, but did not find good replacement for END.

4
0
0

@xChaos I think it is still better suited for writing complex scripts than Python, because it doesn't implode on a single broken indentation.

And I haven't see a wild Pascal for decades. Does really somebody still use it or Delphi?

1
0
0

@urwumpe well, no one who really uses Python would really mention "broken indentation" because Prolog is very strict about indentation check. I had some issues with eg. dynamic typing not behaving as expected, when exchanging data between web, Python variables and database - but I had never single issue with indentation. It is problem which IMHO exists only in imagination of programmers who don't use Python 🙂 (But I was already indenting most of my blocks in other languages before...)

I usually don't invent fictional problems with languages I attempt to use. But I never really learnt to use C++ ... but the reasons, why I decided not to proceed, where entirely wrong. There are real issues with C++, but they are different from the reasons, I gave up. I did not understand some basic concepts at that time. I don't regret I gave up, but the reasons for which I gave up were wrong.

Pythons has many issues, eg. with performance--- and I don't like all the concepts in introduce - but I still like most concepts. The forced indentation of blocks is something, which may cause problems for visually impaired programmers trying to code using screen readers; but on the other hand, I wonder if anyone else would really prefer to NOT use indentation of blocks in any language. Or if indentation error - of course tolerated by most other parsers - would make debugging any easier...

As for Delphi: I don't know. I think there was never any free reimplementation (?). But there may be some Pascal-like frontend for gcc, because algolic languages are more or less all isomorphic...

2
0
0

@xChaos @urwumpe Broken indentation IS a real problem. Did you try to find a single tab between spaces placed by mistake ?

2
0
0

@Karel_Kosnar @xChaos and more fun: Deleting one line and trying to keep track in your head how far down you need to reduce the indentation.

Its really a tricky problem, especially if you collaborate with others and need to merge the changes to a shared file. 😁

1
0
0

@urwumpe @Karel_Kosnar as for tabs vs. spaces: I believe that anyone editing any module would first check which indentation is used and just stick with it.

As for broken indentation tolerated by other languages, but resulting in wrong perception of what is inside which scope: I think it could be even worse problem. Well, there are tools, which format C-style code automatically, but enforcing correct indentation from the very beginning works the same way...

IMHO, the worst problem is not if code is rejected by compiler, but if the code does not do what was expected (especially some seldom reached and barely tested branches...).

There are many silly coding styles, enforced by various organizations. I have encountered one C course, which tries to enforce limit of lines per functions. I am not really sure, that code, which is built from many short functions, so you have to memorize lot of new function names, would be so easy to review...

I believe, that language like C, which allows variable assignment inside expression, should not really comment on language with syntactically significant indentation :-)

But definitely, there are various neuro-divergencies related to coding: some people prefer to see lot of identifiers, lot of variable and function names, but only as little flow control as possible, some people like to see many ASCII characters around identifiers, other want to see just poetry of letters, properly indented.

Generally, math people rely much more on subscripts, superscripts, indentation and other formatting, like matrix and huge parentheses, when doing math on paper on blackboard. So math people usually have very little problem using Python..

I always considered math notation to be way too "hieroglyphic", but I am mostly ok with Python. It is really about if you prefer to see less characters, but see meaning in spatial relationships between them, or if you like to read code rather like text in kind of foreign language... but still text.

0
0
0

@Karel_Kosnar @xChaos and the most fictional stated problem with Python is actually performance. You need a lot of evil effort to sabotage Python that much that it becomes really slow. I have seen server-side Python implementations that competed well with any scripting languages except JIT compilers.

Of course, its slower than Forth...

2
0
0

@urwumpe maybe the performance improved a bit recently, but at certain point of history, at least Python 3 was significantly slower then Python 2 (some years ago).

Deciding which problem is fictional with which language/runtime environment is sometimes tricky.

I am not really open source contributor, most time I work just on my own projects. Also, it is long time since I cooperated on the same source tree with larger team.

Some of the most esoteric language seem funny, because they are mostly rip off of existing syntax, just make some unimportant change to make difference: like Pascal without BEGIN or C without ; or Basic with blocks/scopes or so. And, of course... indentation and whitespace wars.

Only some languages/environments really add important concepts missing elsewhere. Like borrow checker in Rust.

@Karel_Kosnar

0
0
1

@xChaos *perl programmer seeing all caps BEGIN and END* 👀

0
0
0
@urwumpe @Karel_Kosnar @xChaos Not sure what you are doing, but most of the time I hit performance problems with Python really soon. Touch application rendering menus at 5 fps, well, because I did rendering in python (PyEye). Weather nowcaster (in tui) taking 15 minutes to compute forecast, well, because Python. It is possible to use Python in a way where performance is not a problem, but it is not easy.
1
0
0
@xChaos First, there's nothing wrong with Pascal. Second, dynamic vs. status typing. You really can't compare the two.
1
0
1

@pavel @xChaos @Karel_Kosnar Usually I encounter Python as controlling language, that delegates the computation heavy part to C++, for example in Ansys EnSight. Of course its not fast by itself or by using it inefficient (like any programming language). But its decently fast for a scripting language. I also know Python 2 as base for a custom scripting language for the PLM systems of CONTACT Software, used for customizing the software and many extension module of the manufacturer.

1
0
1

@xChaos lua is nice language where everything is table. I really like that OO approach is just syntactic sugar in lua.

1
0
1

@Karel_Kosnar once you implement associative arrays, you can use them also as objects. Ruby does it exactly this way, AFAIK...

0
0
1

@pavel well, or course, "seems to me" is about feelings, not logic.

Yes, the dynamic typing resembles more Ruby or Python. As well as some other features/

There are some traits of what BASIC could be have become (like keyword local and some other hints).

0
0
1
@urwumpe @xChaos @Karel_Kosnar Yes, python is fine (or even very good) controlling language. It is not that good for many other uses.
1
0
0

@xChaos @urwumpe the indentation is not a problem when you think of a program "as a file".. but when it comes to playing on an interactive console - especially when doing webscraping - i prefer Ruby, for instance.. because it allows you to copy&paste ugly code or write ugly inline statements.. you can change the program _anywhere_ on-the-fly without need to restart it (it feels more like debugging a C program).. so you do the webscraping step-by-step.. moreover ductyping.. indeed, it is not fancy nowadays, but it is extremely efficient when it comes to prototyping..

1
0
0

@mig I am not so enthusiastic about modifying program on the fly (while modifying run time data may very useful).

You are right about problems with indentation in console, but on the other hand, Python is really good at oneliners.

Basically, there are about four common ways to determine blocks and scopes - C { } style, Python indentation, retro Pascal style, which is kind of too verbose... and I mentioned Lua style as compromise, which I like because I don't really like to see { } when I am not thinking C (eg. variables not declared as local are probably not restricted to current scope), but the "end is near" approach of reaching end of something almost all the time is also funny.

Lua is definitely way Basic would do it, but the later Basic dialects specified their EndIfs, EndLoops and whatever and if was mess (eg. changing if block to for block can be very useful)

Anyway, the programming languages were somehow invented the wrong way, if it there will be LLMs used to generate code in languages, which were supposed to be human readable (and comprehensible).

Speaking about Lua... just reading the manual, there was special chapter about how not to read file line by line, because it would break garbage collection. If you design "higher level" language this way, you are doing it wrong...

@urwumpe

0
0
0

@pavel @xChaos @urwumpe I prefer Julia, but it is mostly personal choice

1
0
0

@Karel_Kosnar The "multiple dispatch" feature seems like a way to go in any dynamical typed language... @pavel @urwumpe

0
0
0