2 ms·
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
by javajosh 5y 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.
- nradov 5y agoWell Java isn't too bad in that regard. It uses = for assignment and == for equality.
- dboreham 5y agoObviously 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.