Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Besides of the simplicity is there any difference?
My choice would be the second actually -
@LMestre14 someone might add another space in the string and you might spend hours debugging your code
-
@kirill578 then go through the history for the file and see who broke it and how.
-
Especially if interpreted, the second, because the first requires a name lookup plus a cast. The second, in theory, should actually be faster because its a language built-in sort of thing, even though it seems like lazy code.
-
@AlgoRythm not sure if the JIT might be able to optimize the first one into the second one. That would definitely be dope as fuck.
-
Bikonja23868yIf I want the separator to be whatever the system defines as the separator (like how Windows defines the line separator as CRLF and Linux as LF) then the first one (even if, at the moment, all systems define it the same way), but if I know I want it to be space regardless of what the "standard" is then the second one.
What would you go with, and why?
undefined
constant