Hacker News new | ask | show | jobs
by matltc 60 days ago
Makes me miss Ruby. Been in node typescript recently. Everything is a callback returning a promise in some weird resolution chain, mapped and conditional types, having to define schemas for everything and getting yelled at by lsp all day... Oh then you gotta write react components and worry about rerenders and undefined behavior caused by impurity in state, npm, arcane .json configs

Versus active record, mvc, yaml configs, bundler, beautiful syntax, robust and trivially extendable stdlib, amazing native debugging and cli docs out of the box, everything out of the box if you're using Rails

I do not understand why it becomes increasingly irrelevant, especially in web development. I kinda get scripting--bash and python tend to run everywhere

4 comments

> Everything is a callback returning a promise in some weird resolution chain

Care to provide some examples of this? This hasn't been my experience, in general.

Processing async messages received over a socket with multiple namespaces.

Any async chain really where the steps are in a pipeline

Spot on. The worst thing is digging through 500 lines of nested JSON just to find one tiny type mismatch that broke the build. Most diff tools make it worse by showing 100 changes when 99 of them are just whitespace noise. Really makes you miss the simplicity of Ruby/Rails.
Lack of static types is one of the main reasons. Trying to decipher a complex ruby on rails codebase is unnecessarily difficult compared typescript. The tooling is also shit unless you use Ruby Mine.

An absolute shame given how good the functionality is baked into RoR.

I think the only thing you need is grep and know what you are doing.
Skill issue
> getting yelled at by lsp all day

God forbid you get forced to fix bugs before they reach production.

This might shock you but vast majority of bugs are logical.
Sure but I like it when I don’t have bugs that can be detected by static analysis.