Hacker News new | past | comments | ask | show | jobs | submit login

There is nothing "high cognitive load" about having different operators for addition and concatenation.

I think it's simpler.




Who "adds two strings"? You're 1) converting the strings to ints 2) adding the ints.

The possibility of confusion is the part that is already complex.


> Who "adds two strings"?

$timeText = $systemHours . ':' . $systemMinutes;

vs

$durationTimer = $userInputHours + 1;

There ya go.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: