Improve Multi-Phase Design, Comptime, and Debugging Experience

Hello Mojician!

After playing with Mojo for a while, I noticed that after pushing my program from runtime into comptime more often, it becomes more abstract and faster. I mean, it works really well, but as a beginner and heavy debugger user, I always thought I could pause all of those at the same time with breakpoints because they are in the same scope.

  • In Structs
    • alias
      It’s more like a constant but exists at design time and compile time. Breakpoints on it will not have any effect.
    • var
      Actually initialized in __init__(), which is easy to understand. But if I set a value in the struct outside __init__(), I always get unknown tokens at the end of a declaration.
  • In Functions
    • parameter
    • argument
      They are mixed in the same scope, but the messages are clear enough for me.

I don’t think these are truly problems; it always depends on how much we know about this language and how it works! I want to help other beginners like me learn this elegant language.

I know the Modular team works a lot on LSP (and works very hard!). Big thanks to the team.

Also, I’m curious about how best to handle potential enhancements: should I request the official team to implement them, or should these enhancements be developed independently by the community? I think this could help other beginners like me decide how to approach improving Mojo tooling.

I can write an issue or proposal if needed!


Were you confused by any of these situations?
  • All is good for me (no problems with debug or LSP)
  • Confused by var and alias
  • Confused by parameter and argument
  • My LSP isn’t working, so I don’t know what’s happening
  • Confused by crash messages sometimes
0 voters