Arvin_David
MModular
•Created by Arvin_David on 4/16/2024 in #questions
Future of Literals. Are they going to be removed?
As a very interesting question for myself, we can see literal types in many of the AOT-compiled languages out there. But in Mojo, because of its goal to be more Pythonic, are we going to eventually deprecate literals? For example to have only one single 'string' type in the future?
11 replies
MModular
•Created by Arvin_David on 4/7/2024 in #questions
Check type of a variable
Hi folks
At the moment, while the builtin type function is not implemented yet, What's the best way to identify if a variable is a string, an int or another type?
4 replies
MModular
•Created by Arvin_David on 4/6/2024 in #questions
Optional function argument?
Hi everyone
I'm wondering if it's possible to have an optional argument for functions in Mojo. So then if an argument were given, it would have a value (int for instance) otherwise, it would be None.
6 replies
MModular
•Created by Arvin_David on 3/28/2024 in #questions
How to Create a Multi-Type List in Mojo?
Hi all!
I'm working with Mojo and need to create a list with elements of different data types (integers, strings, booleans, etc.). How can I achieve this? Are there specific collection types or methods in Mojo for mixed data types? Any guidance or documentation links would be greatly appreciated.
Thanks in advance!
25 replies