3 ms·
Conciseness is better, for the same reason we don't do: int a = b plus c; It's easy to misguide people with regional words, symbols are universal
by WhereIsTheTruth 2y ago
Conciseness is better, for the same reason we don't do:
int a = b plus c;
It's easy to misguide people with regional words, symbols are universal
- riffraff 2y agoConciness is a valid concern, but symbols are exactly as universal as words, just consider the division sign[0] in math, or the assignment operator in programming languages[1]. Plus, Java libraries used @Nullable and @NonNull annotations for >10 years, I doubt they would confuse anyone. [0] https://en.wikipedia.org/wiki/Division_sign https://en.wikipedia.org/wiki/Division_sign [1] https://en.wikipedia.org/wiki/Assignment_(computer_science)#Notation https://en.wikipedia.org/wiki/Assignment_(computer_science)#...
- jeltz 2y agoIn the case of addition I kinda wish we actually did not have one enshrined operator. We have wrapping_add(), saturating_add(), checked_add() and undefined_overflow_add(). Which one should be default?
- elric 2y agoCome now, that's a disingenuous take. I explicitly mentioned that some symbols make sense while others don't. Obviously the + sign is pretty universally known for addition. Overloading + for string concatenation was probably a more intuitive option than PHP's . concatenation operator. But not every symbol is as ubiquitous as the plus sign.