Re:Why I'm not a React Native developer
by WalterSear on Saturday August 19, 2017 @05:36PM
(#15055766)
As a professional programmer, I've come to prefer code written to be understood by someone who started two weeks ago.
[ Parent
| on HN ]
In that case, don't write any code. Don't use function. Don't use React. Don't use lodash. Don't use third party library.
People who only start coding for two weeks can't understand any code.
People who start has enough experience to work, but only start in this project for two weeks, will understand "!!" idiom.
Re:Why I'm not a React Native developer
by debaserab2 on Saturday August 19, 2017 @06:05PM
(#15055881)
Then by that principle you'd want to use !! since casting via function or constructor differs more between languages.
Re:Why I'm not a React Native developer
by WalterSear on Saturday August 19, 2017 @06:22PM
(#15055959)
What it looks like in other languages is only minorly relevant to its obviousness and readability.
Re:Why I'm not a React Native developer
by debaserab2 on Saturday August 19, 2017 @06:48PM
(#15056067)
I don't see the argument that Boolean(val) "reads easier" than !! as long as you know what !! does.