Replies: 3 comments 2 replies
-
No, because that is incompatible with python. In python, that function returns None, not the result of x+1. |
Beta Was this translation helpful? Give feedback.
-
Hi all, we're building the core Mojo type system right now, not adding tons of syntax sugar. I'm pretty opposed to adding syntactic sugar before the core language is settled. We need to get the bricks in place to get a sense of how the language is used in practice, we don't just add things "because we can". |
Beta Was this translation helpful? Give feedback.
-
I added this explanation to the roadmap: Why not add syntactic sugar or other minor new features?We are frequently asked whether Mojo will add minor features that people love First, notice that Mojo is still young: we are still "building a house" by Furthermore, second, syntactic sugar is like mortar in a building - its Third, there is Python and the Python community. It is important to us that For all these reasons, "nice to have" syntactic sugar is a priority, and |
Beta Was this translation helpful? Give feedback.
-
In Python we have to use return statement to return value from function:
Would it be possible to have implicit return like in functional programming, so functions always return something:
Beta Was this translation helpful? Give feedback.
All reactions