Hacker News new | ask | show | jobs
by mitchitized 1065 days ago
Disappointed to find a puff-piece on typescript. Dishonest headline.

Javascript frustrates me just as much as the grumpy old man in the article. That said, I once sat down and asked myself, "self, why was it okay to live through the php years yet you despise javascript for being the same way?" And then it dawned on me, my involvement in php projects forced me to have a low-level understanding of the language that I never acquired with javascript.

The consequence for me is that javascript is still full of voodoo and dark magic, all very frustrating and bowel irritating. But that's not the fault of the language, that's the fault of the knucklehead trying to use it without really digging into the internals and understanding how it should be used. That would be me.

Not learning how javascript internals work and complaining about javascript is no different than when Mongo first came out, and folks shoved third normal form schemas in there and complained loudly that Mongo was a lousy RDBMS. It's not an RDBMS, mate.

If anything this article instead implies that typescript means you don't have to bother learning javascript internals. Do not recommend.

2 comments

JS core (that's worth knowing) is pretty simple. My mental model is basically there are primitive types, arrays [], objects {}, and Promises. After that, you basically just have to understand the event loop and you're good to go. Then there's other special things like async/await, spread operator, etc. Among programming languages, it doesn't have THAT many things to learn at its core.
Much simpler explanation - php and js are both terrible languages.
You're talking like it's still 2010. Modern incarnations of both of those languages are pretty great.
I think "great" might be overstating things. "Better", perhaps.

But there certainly are use cases where php or javascript are the best tools.