Hacker News new | ask | show | jobs
by dartos 626 days ago
That’s a lot of words unrelated to my point about the API being poorly designed.

Typescript is irrelevant.

The implementation of arrays in js is irrelevant.

Js being intentionally simple is irrelevant (and might even strengthen my point)

1 comments

Your very definition of "poorly designed" is overly rigid and unproductive. When you design APIs for everyday human use, you value expressiveness and succinctness over verbosity and explicitness. Because such APIs are more of a "human interface" (like UI) than a "program interface" in a sense.

One thing is some random payment processor API that you encounter only once in your career (it doesn't need to be terse and it is better to avoid any magic here) — and whole another thing is stuff like jQuery or React, which I can produce/read in thousands of lines per day. You would design such APIs with different objectives, like being easy to type, easy to read (once you know the API).

The mantra "explicit is better than implicit" is wrong, because it really depends.