DEV Community

loading...

Discussion on: Tell me an unpopular software opinion

Collapse
lukewestby profile image
Luke Westby • Edited

IMO the premise that most users don't use it effectively disproves the assertion that it is well-designed. To me, a language that is well-designed is easy to use effectively by default, and so most people would. I like JavaScript because the platform runs in so many places and there are so many different things I can do with it. This is ultimately not a consequence of good language design, though.

Collapse
daniel13rady profile image
Daniel Brady

I like JavaScript because the platform runs in so many places and there are so many different things I can do with it. This is ultimately not a consequence of good language design, though.

I would amend that it to "popularity and versatility are not necessarily a consequence of good language design." 👍

To me, a language that is well-designed is easy to use effectively by default, and so most people would.

I suppose we should come up with a definition of "effective use" for this discussion before we dive too far and realize we're not talking about the same things. 🤓

When it comes to effective use, programming languages are quite similar to natural languages: it's all about communication. How well can you say the right thing?

One of the key differences between natural language and programming language, though, involves the audience: natural languages meant to be read by humans, but programming languages are are meant to be read by humans and computers.

So effective use of JavaScript is a question of how well you can balance what you say, such that it is right (for some, and possibly different, definitions of 'right') for both the readers of your code and the machine that eventually executes it.

To be able to find this balance, and communicate effectively with JavaScript, you need to understand the impact saying certain things in certain ways has on both humans and machines.

Language design definitely influences how challenging this process is, and there are some features of JavaScript (some present in the original design, some recent additions of ES6) that make this process harder than it needs to be, but not enough to make me feel it deserves the amount of flak it receives from our community.