News for hackers. Stuff that matters.
Re:Rewrite it in Rails by wkirby on Monday November 04, 2024 @04:55PM (#42046377)
I do find 6-month old typescript to be easier to return to than 6-month old ruby — same goes for most typed languages. The reality is, though, that the benefit of strong types isn't so much in giving you compile time errors as it is forcing the devs to document their method signatures.
Re:Rewrite it in Rails by chris12321 on Monday November 04, 2024 @07:07PM (#42047422)
I find that a 6-month-old JS project will often not even boot since its exhaustive dependency list will be out of date and now mutually incompatible. You have to feed a JS project with updates every couple of hours, or it will die like a Tamagotchi.
Re:Rewrite it in Rails by shepherdjerred on Monday November 04, 2024 @10:04PM (#42048240)
I've seen comments like this almost daily this week.

Does HN not use lockfiles or something? Your node/npm project will work just fine if you use the same version of node/npm and have a lockfile.

Maybe you're using npm i (which can upgrade dependencies in some cases) instead of npm ci [0] (which always uses the lockfile dependencies).

In any case, this is a general problem of package managers and has nothing to do with the language. You'll need something similar if you're using _any_ external dependency in Rust, Python, Go, etc.

[0]: https://docs.npmjs.com/cli/v10/commands/npm-ci