Python Comprehensions in Cpp2 #757
Closed
msadeqhe
started this conversation in
Suggestions
Replies: 4 comments 15 replies
|
Comprehensions would eliminate the need for the ternary |
0 replies
|
Re ternary |
14 replies
|
What would the type of |
1 reply
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Let's again glance terser function syntax:
: (x) x + 1Cpp2 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.All reactions