Hacker News new | ask | show | jobs
by javajosh 1730 days ago
How do you feel about = (assignment and equality check)? Or > which can be used for markup or less than or part of a function arrow? Or {} which can be used as a block or as an object? Or : which can be used for...so many things! Even the humble . can be used to dereference or as a decimal point. My point is that if "a symbol having multiple meanings" is a problem, then basically all languages have a problem.
2 comments

Obviously that's a bad idea, which is why many languages don't overload = with two purposes.

{} always means "group of related stuff"

: always means : (sic) separator between a thing and something about the thing.

Well Java isn't too bad in that regard. It uses = for assignment and == for equality.