what do you prefer stylistically?

ignore the concrete type (could also be float, int,…)

Follow

@noiob I prefer casts if its a well defined operation that's relatively simple, like casting between number types, where you don't really need any additional parameters to do the conversion

I don't like casts if it's doing a more complex conversion, like parsing out a float from a string, which relies on locale etc

Sign in to participate in the conversation
Fuzzy Systems Masto

Instance run by a non-profit association, with a mission to encourage an open internet, welcoming to everyone.