Skip to content

Commit 1162db6

Browse files
authored
Update README.md
1 parent faa7df2 commit 1162db6

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

README.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,33 @@ The performance of both languages was benchmarked using [Hyperfine](https://gith
3434
For all the codes, Python ran significantly faster than Mojo and beat Mojo, in speed, by a huge margin
3535

3636
## Comparing the advantages of both
37+
3738
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.
3839

3940
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
4041

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:
43+
44+
![Screenshot 2024-02-15 151249.png](https://prod-files-secure.s3.us-west-2.amazonaws.com/2cbffb70-466c-4ac8-89c0-c8158d7266f5/9f765102-b87a-4d18-8f1f-bdeeea815662/Screenshot_2024-02-15_151249.png)
45+
46+
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.
49+
50+
i.e:
51+
52+
![Screenshot 2024-02-15 151936.png](https://prod-files-secure.s3.us-west-2.amazonaws.com/2cbffb70-466c-4ac8-89c0-c8158d7266f5/6f7e9102-fbf8-4d6d-a4a4-dd6d63c1b6ef/Screenshot_2024-02-15_151936.png)
53+
54+
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
57+
58+
Like for example:
59+
60+
![Screenshot 2024-02-15 152231.png](https://prod-files-secure.s3.us-west-2.amazonaws.com/2cbffb70-466c-4ac8-89c0-c8158d7266f5/667d5e67-1c64-4168-953e-345ff163ffd3/Screenshot_2024-02-15_152231.png)
4261

43-
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
4463

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
4665

4766

0 commit comments

Comments
 (0)