Hello
What does Python need to be a super language?
If you want you can share your ideas in this forum and in the following survey.
https://surveys.jetbrains.com/s3/c8-pyth...urvey-2020
1: A type of symbolic object for algebraic manipulation CAS
2: ...
There is also a draw with 100 winners (surprise prize) to whoever completes the form
Is it well translated in multiple languages, or did you have to answer in French?
It is a high quality survey.
I know they won't add it, but Python could use a DO-WHILE or REPEAT-UNTIL or equivalent loop structure where the condition is evaluated at the end of the loop. I don't know that I've ever used a language without such a loop construct. I know you can use a "while True:" and a "break" but that looks so kludgy.
(On the plus side, I don't know that I've seen another language with the while-else construction that Python has. That's kind of cool.)
(11-01-2020 05:59 AM)Wes Loewer Wrote: [ -> ]I know they won't add it, but Python could use a DO-WHILE or REPEAT-UNTIL ...
Assumed Python do have repeat/until:
repeat:
... # some code
if condition: continue
bad = 0
... # code that might turned "bad"
until bad
if condition is true, it will jump to line "until bad".
However, bad is a local variable, not existed before condition test.
(Or worse, bad existed outside repeat/until loop, and used for until ...)
You could solve it by moving up bad=0 before the condition test.
But, that would be messy to document repeat/until usage.
Static typed language does not have this problem. Code won't compile.
A native BCD decimal data type would be a big step in the right direction. C# handles it very well.
(11-01-2020 05:59 AM)Wes Loewer Wrote: [ -> ]I know they won't add it, but Python could use a DO-WHILE or REPEAT-UNTIL or equivalent loop structure where the condition is evaluated at the end of the loop. I don't know that I've ever used a language without such a loop construct. I know you can use a "while True:" and a "break" but that looks so kludgy.
(On the plus side, I don't know that I've seen another language with the while-else construction that Python has. That's kind of cool.)
You can do this:
Code:
while True:
do something
do some more
a += 1
If a >= 10:
Break
That's the equivalent of
Code:
DO
do something
do some more
a = a + 1
LOOP WHILE a < 10
I know you think it looks kludgy as did I, coming from a BASIC background, but if you use Python for a while you get used to it. Since Python programmers think in terms of While True, there's no incentive to change it.