You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I delve into the world of Mojo, I've come across two notable distinctions between the Mojo REPL and other interactive shells, such as the Python shell and GHCI. These differences pertain to the output of expressions and the absence of a specific variable for storing the last result.
Firstly, in the Mojo REPL, the results of expressions are not automatically displayed, in contrast to the Python shell or GHCI. This necessitates the use of the "print" statement each time to view results, which can potentially slow down and complicate the interactive session.
Secondly, the Python shell employs the special variable "_" to store the result of the last expression, allowing users to easily reference it without the need for recomputation. Regrettably, this feature is not present in the Mojo REPL.
I am curious to know whether these differences between the Mojo REPL and other interactive shells were intentional design choices or if there is a possibility of incorporating these features in future Mojo releases. In my view, implementing these two functionalities would significantly enhance the user experience within the Mojo REPL, especially for those accustomed to working with other interactive shells.
I genuinely appreciate the hard work that has gone into the development of Mojo and eagerly await your response and insights regarding these suggestions.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
As I delve into the world of Mojo, I've come across two notable distinctions between the Mojo REPL and other interactive shells, such as the Python shell and GHCI. These differences pertain to the output of expressions and the absence of a specific variable for storing the last result.
Firstly, in the Mojo REPL, the results of expressions are not automatically displayed, in contrast to the Python shell or GHCI. This necessitates the use of the "print" statement each time to view results, which can potentially slow down and complicate the interactive session.
Secondly, the Python shell employs the special variable "_" to store the result of the last expression, allowing users to easily reference it without the need for recomputation. Regrettably, this feature is not present in the Mojo REPL.
I am curious to know whether these differences between the Mojo REPL and other interactive shells were intentional design choices or if there is a possibility of incorporating these features in future Mojo releases. In my view, implementing these two functionalities would significantly enhance the user experience within the Mojo REPL, especially for those accustomed to working with other interactive shells.
I genuinely appreciate the hard work that has gone into the development of Mojo and eagerly await your response and insights regarding these suggestions.
Beta Was this translation helpful? Give feedback.
All reactions