March 6, 2024

Modverse #25

Last week, we released MAX Developer Edition Preview to the world! Thank you to everyone who has already tried it out, and for all the feedback. It was also a huge release for Mojo which included the debugger. Make sure to check out the blog posts below for more details about everything we released!

Blogs, Tutorials, and Videos

Awesome Mojo

Upcoming Events

Mojo Language Committee

The team met again to discuss feature requests from the community. Thanks for all the great suggestions and continued interest in advancing and improving the language!

And thanks to Laszlo for driving this initiative forward.

#1746: Remove raises effect in favor of explicit return types

For now, our decision is to retain the existing semantics for raising functions, to avoid breaking python semantics completely. It's already possible to opt out of this explicitly by removing raises, and returning a custom type such as Variant that contains a result or an error. Moreover, there is currently work being done to improve and extend error propagation capabilities, and we intend to revisit this question in the future as the language matures.

#1767: Follow Python’s behavior for 0 or "hello"

We discussed the unexpected behavior of short-circuiting conditional expressions in Mojo, such as the expression 0 or "hello" evaluating to a True value of type Bool. Since Mojo is a statically typed language, it is not trivial to mimic Python’s behavior, and these expressions are not always obvious. In the future, we'll look into using existentials. The compiler could find the common traits or methods on the types of the two operands, and emit something that conforms. For now, we decided that we will not change the existing behavior, until we have more dynamic features built out. We will add documention for this until then, as it's a potentially confusing deviation from Python.

#1881: Rename Reference to Ref

We discussed shortening the names of types such as Reference, Optional, and Pointer. Shortening commonly used keywords has precedent in both Mojo and Python such as def, fn, and var. However, shortening type names is not nearly as obvious. We decided that in order to avoid unnecessary churn, we will be careful with name changes. We'll hold off on breaking name changes until the semantics of these most common types are settled, and we have explicit naming guidelines.

Sign up for our newsletter, Modverse

Get all our latest news, announcements and updates delivered directly to your inbox. Unsubscribe at anytime.

Thank you for your submission.

Your report has been received and is being reviewed by the Sales team. A member from our team will reach out to you shortly.

Thank you,

Modular Sales Team

Jack Clayton

AI Developer Advocate

Jack started his career optimizing autonomous truck software for leading mining companies, including BHP and Caterpillar. Most recently he was designing computer vision software, putting AI inference pipelines into production for IDVerse. He is enormously passionate about the developer community, having been a Rust, Go, Python and C++ developer for over a decade. Jack enjoys making complicated topics simple and fun to learn, and he’s dedicated to teaching the world about Mojo 🔥.

Laszlo Kindrat

AI Compiler Engineer

Laszlo is a former data scientist turned software engineer. Before Modular, he built XMOS’s first ML compiler and maintained their TFLite Micro runtime, then worked as lead engineer on the MLIR-based software stack at Luminous Computing. He enjoys traveling and all New England seasons.