Modverse Weekly - Issue 25

March 6, 2024

Jack Clayton

AI Developer Advocate

Laszlo Kindrat

AI Compiler Engineer

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.