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
Copy file name to clipboardExpand all lines: README.md
+22-3Lines changed: 22 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,14 +34,33 @@ The performance of both languages was benchmarked using [Hyperfine](https://gith
34
34
For all the codes, Python ran significantly faster than Mojo and beat Mojo, in speed, by a huge margin
35
35
36
36
## Comparing the advantages of both
37
+
37
38
1: Python installation was much simpler compared to Mojo. Installing Mojo was not user-friendly; it would have been better if there was a one-click installation option for Mojo on Windows, similar to Python.
38
39
39
40
2: The syntax of Mojo and Python was quite similar, with the main difference being that in Mojo, you need to use Python functions by importing them. For example, to take user input, you have to import the "input" function from Python. This made Python easier to learn
40
41
41
-
3: Mojo provided helpful explanations with each error, making it easier for me to understand and identify my mistakes. Python, on the other hand, lacked this feature, which is an advantage of Mojo.
42
+
Like for example to use the input function, I first need to import it from Python and then use it in Mojo:
3: Mojo provided helpful explanations with each error, making it easier for me to understand and identify my mistakes. Python, on the other hand, lacked this feature, which is an advantage of Mojo.
47
+
48
+
4: The code itself requires a main() function to be called in Mojo for it to run while Python runs as is.
While python can run without adding this main() function
55
+
56
+
5: The Discord community of Mojo is very active and helpful. Their Discord has a chatbot which guides through every inconvenience with ease and is up to date with all the errors that I encountered while coding in Mojo
4: The code itelf requires a main() function to be called in Mojo for it to run while Python runs as is.
62
+
This bot is equipped with the latest info regarding Mojo, so was a very helpful feature
44
63
45
-
5: The discord community of Mojo is very active and helpful. Their discord has a chatbot which guides through every inconvenience with ease and is up to date with all the errors that I encountered while coding in Mojo
64
+
6: Python proved to be more user-friendly for me, mainly due to its proper documentation (because of it being older than Mojo). Moreover, the commands in Python were straightforward and simple to use, unlike Mojo, where there were some instances like for example me clearly stating the variable type (requiring explicit variable declarations), a step which I didnt have to do in Python
0 commit comments