Replies: 2 comments
-
Usually IDEs like PyCharm make suggestions over the code or when you ask for a report with improvements. |
Beta Was this translation helpful? Give feedback.
-
There's indeed the possibility of writing tools such as Rust's clippy and integrating this with the VSCode mojo LSP plugin (or a separate one). Now, the language is so young so maybe we need far more iterations (with the protocol/traits, lifetime syntax, object-oriented syntax et rest) before it's worthwhile writing such tools. |
Beta Was this translation helpful? Give feedback.
-
Mojo is a language that aims to match and maybe exceed the execution speeds of C, C++, Rust, Zig etc ("working backwards from the speed of light "), but it was also mentioned that its compiler would not be magic. I'm assuming this means that the programmer would need to know how to optimize code.
To help them in this, what tools can be provided? The community can build things like profilers and static analysis tools, but things can be made available at the language and compiler level as well. For example, C++ contracts have an assume semantic that optimizes code based on some invariants (mentioned at around 35:50). Wuffs uses assertions to guide optimizations. There are also things like compiler optimization remarks that hint at possible optimizations.
Edit: Also see #2261. Explainable Profile Guided Optimizations could also be a step to helping programmers optimize their code.
Beta Was this translation helpful? Give feedback.
All reactions