logoalt Hacker News

ptxtoday at 10:08 AM1 replyview on HN

Wow, their Java code example [0] makes COBOL look elegant and terse by comparison.

[0] https://community.ibm.com/community/user/blogs/gregory-cerne...


Replies

DarkUraniumtoday at 10:40 AM

I know it's not the only problem (but it is IMO the main one), but this is why I'm a proponent of allowing operator overloading in languages.

Yes, you can't tell at a glance if `+` really still does what it should, but I find that problem no different from a library mis-naming a function and/or said function having strange side-effects.

`+` should do addition, period. No, not even concatenation if possible (I do find the lack of a separate concatenation operator to be a language flaw --- that said, I understand the use of `+` for concat in libraries targeting languages that offer no alternative).

I think the abuse (especially in C++ ... seriously, allowing overloading of the comma operator? --- and <iostream> working via bit-shifting streams by ${some_string} bits) gave everyone a bad taste and they kind of threw out the baby with the bathwater.

show 1 reply