You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I might be a newbie, but I am pretty amazed that this amount (and "cleverness" level) of implicit type coercion is considered good style in JavaScript. Given how String(), Number(), Boolean() and whatnot are much more readable, I'd suggest that these would be the preferred style to implicit coercion of the +variable type, primarily for readability reasons, as I'm not really that versed into side-effects of either of the two coercion approaches.
I do understand there are performance implications, so I'd understand if these were advised as performance hacks for code where profiling has shown critical perfomance issues.
However, if brief history of software teaches us anything it's that only speed that really matters in the end is the speed that the development team moves toward a product that finally has paying customers. Make it work, make it pretty, make it fast, wasn't it something like that?
I'm not trying to start a flame (my ninja level is certainly not in the ballpark) but I am curious if there are real reasons behind these choices that are not known to me.
The text was updated successfully, but these errors were encountered:
I might be a newbie, but I am pretty amazed that this amount (and "cleverness" level) of implicit type coercion is considered good style in JavaScript. Given how String(), Number(), Boolean() and whatnot are much more readable, I'd suggest that these would be the preferred style to implicit coercion of the +variable type, primarily for readability reasons, as I'm not really that versed into side-effects of either of the two coercion approaches.
I do understand there are performance implications, so I'd understand if these were advised as performance hacks for code where profiling has shown critical perfomance issues.
However, if brief history of software teaches us anything it's that only speed that really matters in the end is the speed that the development team moves toward a product that finally has paying customers. Make it work, make it pretty, make it fast, wasn't it something like that?
I'm not trying to start a flame (my ninja level is certainly not in the ballpark) but I am curious if there are real reasons behind these choices that are not known to me.
The text was updated successfully, but these errors were encountered: