Hacker News new | ask | show | jobs
by stephc_int13 1858 days ago
Operator overloading is something that has often been misused, and even if I tend to like syntactic sugar, I understand that being explicit is more important.

When trying to understand a codebase, it is much easier to not worry about hidden indirections.

1 comments

but you can misuse anything, + vs add was an example for this.

being able to misuse a PL i believe is not a bug but a feature. we really suck at predicting the future.

This is not the role of langage designers to prevent bad programmers to write bad code.

But it is better to avoid giving them too many ways to shoot themselves in the foot.

Forcing the code to be explicit is good design, in my opinion, simply because it is much easier to write code than to read it, we have to put more weight on the clarity side.