There is a big difference between concise code and dense code. Widespread usage of ternary operators more often leads to the latter, which has a very detrimental effect on code maintainability.
Writing less characters isn't the same as writing better code.
Only to a limited degree. The techniques tend to be quite different. In most cases, concise code involves a meticulous architecture, while dense code involves syntactical tricks.
Or to put it in another way: concise code is thoughtful, while dense code is 'clever' <shudder>.
Their respective goals are also quite different. Concise code optimizes for less logic and more semantics, while dense code optimizes purely for less characters and/or lines.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
There is a big difference between concise code and dense code. Widespread usage of ternary operators more often leads to the latter, which has a very detrimental effect on code maintainability.
Writing less characters isn't the same as writing better code.
But both sets overlap ;)
Only to a limited degree. The techniques tend to be quite different. In most cases, concise code involves a meticulous architecture, while dense code involves syntactical tricks.
Or to put it in another way: concise code is thoughtful, while dense code is 'clever' <shudder>.
Their respective goals are also quite different. Concise code optimizes for less logic and more semantics, while dense code optimizes purely for less characters and/or lines.