Python Comprehensions in Cpp2 #757
Replies: 4 comments 15 replies
-
Comprehensions would eliminate the need for the ternary |
Beta Was this translation helpful? Give feedback.
-
Re ternary |
Beta Was this translation helpful? Give feedback.
-
What would the type of |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Let's again glance terser function syntax:
: (x) x + 1
Cpp2 already doesn't require parentheses within control structures, and it allows to write expressions without
=
in function declarations at the same time. These syntax choices made Cpp2's syntax somehow compatible with Python'sif
-expressions and Comprehensions. What if Cpp2 also support them?For example:
Comprehensions are harder to implement than
if
-expressions. So it may be the reason to completely ignore them in Cpp2.Beta Was this translation helpful? Give feedback.
All reactions