3 ms·
In Rust you are forced to specify the type for functions and consts/statics, there isn't any option for inference there.
by FreeFull 7y ago
In Rust you are forced to specify the type for functions and consts/statics, there isn't any option for inference there.
- Quekid5 7y agoIndeed. It's a smilar thing in Scala, and I actually find it kind of limiting because Scala (like Rust, AFAIK) doesn't have "where expressions" or "declare a function without types just because", so you're actually discouraged from making really local functions that just frobnicate-the-transmogrifier because every non-anonymous function requires a declaration. (I still very much appreciate Scala for what it is. No real experience outside of toys with Rust.)