This is also what gets me when people are against the assignment expression operator(:=) because they claim, "well it can be confusing if you don't know what it is"... like yeah all code is confusing if you don't know what it is. It's like people don't want to grow and want to keep writing the same code that would run on Python 2.5
back in the day jetbrains syntax highlighting support for scala wasn’t perfect.
in scala object.prop == (object prop). you can replace dot with space and sometimes syntax highlighting would mark it in squiggly reds which is annoying so i would add dots where it would do that or where it would make sense.
I would use space when it made sense as a dsl like account deposit 300 usd
one week the principle engineer became more and more irritated and wouldn’t admit to it or share his reason. A weekend comes in, he is at the end of this rope and he tells he can’t understand why i put a dot here and not there. i explain the above and he refuses to accept this, I explain again that you can simply drop the dot sometimes and i do it for aesthetics. as far as i know he still doesn’t accept it because they threw away the scala code and replaced it with beam
I had someone who didn't like the safe navigation operator in groovy for that same reason. I just had to roll my eyes and change the code so he'd approve the PR
View all comments
422
u/imthebear11 Apr 30 '22
This is also what gets me when people are against the assignment expression operator(
:=) because they claim, "well it can be confusing if you don't know what it is"... like yeah all code is confusing if you don't know what it is. It's like people don't want to grow and want to keep writing the same code that would run on Python 2.5