Replies: 4 comments 5 replies
-
Could you explain that more? I am coming directly from Python in which structural pattern matching (match-case) is just advanced syntatic sugar for if-else statement which of course does not gives additional profit in terms of speed comparing to typical switch-case statement. |
Beta Was this translation helpful? Give feedback.
-
Python match is very flexible and as Mojo is a Pythonic language that will track the Python syntax, that's basically all we need. |
Beta Was this translation helpful? Give feedback.
-
Hi all, per the roadmap, we are not implementing syntactic sugar features right now: In the near-term, we will not prioritize "general goodness" work such as:
I will add more rationale to the roadmap, because this is frequently asked. |
Beta Was this translation helpful? Give feedback.
-
I added this to the roadmap doc: 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.
-
Do you consider implementing Pattern Matching as an expression, to step out from C-legacy(lots of
return
statements that lead to bad/mutable code) and make Mojo a modern language with functional style features that currently missing in Python?Beta Was this translation helpful? Give feedback.
All reactions