Santiago Valdarrama’s Post

View profile for Santiago Valdarrama, graphic

Computer scientist and writer. I teach hard-core Machine Learning at ml.school.

There's one thing I don't understand about implicit type conversions in Mojo🔥 (maybe @clattner_llvm can chime in and help me): Mojo's documentation says that implicit conversions should only be supported where the conversion is lossless. I think that's not how it works now? var a : Int64 = "Hello World!" This code converts the String into the value 1. Is this considered lossless? var b : Int64 = 1.67 And this code assigns the value 1 to variable b. Is this lossless? Maybe I'm confused about the meaning of "lossless" here?

Adam McKinnon, PhD.

Head of People Platforms and Analytics @ Reece Group | HR Tech | Board Director

5mo

Could it be Mojo keeping you on your toes with these cryptic conversions?🧐 Happy coding

Like
Reply

To view or add a comment, sign in

Explore topics