News for hackers. Stuff that matters.
Re:Modern Javascript: Everything you missed over the last 10... by Jarwain on Saturday May 15, 2021 @02:39PM (#27167750)
Yup! Especially using VsCode, which feels optimized for TS development. Click the var you want to rename, hit F2, rename it, and it renames all instances of the var. If you're renaming an import, it'll do it across all the files automagically. Moving a file? Imports get updated too!

Plus you've got MS's intellisense powering autocomplete. Unfortunately, I don't think it can recognize different foods, but as long as you've typed your variables the autocomplete is pretty good!

EDIT: the OP had a typo, saying food instead of good, for context as to why I made a food joke

Re:Modern Javascript: Everything you missed over the last 10... by bcrosby95 on Saturday May 15, 2021 @03:24PM (#27168100)
None of this is better than the experience in Java though, which is what they were comparing it to. Maybe they were using shit tools?
Re:Modern Javascript: Everything you missed over the last 10... by Jarwain on Saturday May 15, 2021 @03:52PM (#27168395)
The gp made this comment (https://news.ycombinator.com/item?id=27168048).

> This biggest "aha" benefit I get from TypeScript is that it is structurally typed, while Java is nominally typed. In my experience it has proven much easier to refactor in TS because I just need to ensure my objects have all the right properties. With Java if I have a Thing1, but a library is updated to add just a single new property so now there is a Thing2 type, well now then all the places I need a Thing2 I have to completely copy over from Thing1 - I can't just add the property and be on my merry way. This happened to me many times in my Java career - I still think I have PTSD having to do a Jersey 1.x upgrade to a Jersey 2.x version across a large codebase. It was a nightmare I've never had anything come close to with Typescript.

Not so much refactoring as upgrading, but tis an example of why duck typing is kinda nice

Re:Modern Javascript: Everything you missed over the last 10... by wernercd on Sunday May 16, 2021 @12:16AM (#27171185)
> maybe they were using shit tools

They weren't using Java, so probably not. ZING!

But seriously... If you want to compare tooling, you shouldn't be comparing a scripting language vs a language like Java... compare Java vs C# and C#'s experience is better than Java's IMO (not REAL experienced with Java but I've done some basic stuff).