Hacker News new | ask | show | jobs
by watty 2998 days ago
I disagree - not adapting to the latest language paradigms because you find it more difficult is code smell.
2 comments

Code smell describes code which has incurred technical debts among other things. People do not have it.

The "latest language paradigms" in this case are JavaScript adopting a style of programming 40+ years old (Simula) -- despite its originating model being younger (self).

Adopting paradigms because they are "recent additions" to a language is cargo cultism.

Paradigms come with idioms that suit some problems better than others, and have all sorts of trade-offs and considerations.

Inheritance is now widely regarded as a design approach, overall, best avoided.

"easy to reason about" =/= hard to understand. The ease of reasoning about something is a feature of how complicated it makes it (partly, its incidental complexity). It's not to do with how dumb you are.

Inhertiance, for example, creates systems that are often needlessly hard to reason about.

We had a whole generation of class-heavy inheritance-ridden frameworks and applications. It's bad enough in static languages. In JS, it quickly becomes an unmaintainable pile of spaghetti.

Object literals with small doses (read: 1-2 levels at most) can be good. Going further risks multi-level breakage because properties are bound to get added/removed across the codebase over time due to the dynamic nature of JS.