Are Type Hints Still Possible in Mojo?
Hi all - I was wondering, is there a way to write a
For example I tried writing this earlier. I'm guessing it's not the right approach though, as the compiler gives a warning that
Although in this case, I suppose it'd be a better idea to use the built-in
def function in Mojo that uses type hints like in Python 3?For example I tried writing this earlier. I'm guessing it's not the right approach though, as the compiler gives a warning that
cannot use a dynamic value in type specificationAlthough in this case, I suppose it'd be a better idea to use the built-in
Int type, to let others know what kind of value x is expecting?