News for hackers. Stuff that matters.
Re:Eloquent JavaScript 3rd Edition (2018) by mpoteat on Sunday April 26, 2020 @08:38PM (#22991753)
I would maybe recommend Typescript if you want to harness the type level power of "proving" correctness for certain aspects of your code.
Re:Eloquent JavaScript 3rd Edition (2018) by leshow on Sunday April 26, 2020 @11:14PM (#22992554)
Big scare quotes there, you can't really 'prove' much in typescript. Don't get me wrong, it's a nice type system they've tacked on to JS, but it's far and away from proofs of correctness. At best, it's an optional type system with escape hatches.
Re:Eloquent JavaScript 3rd Edition (2018) by futureproofd on Monday April 27, 2020 @10:26AM (#22996108)
You can only 'prove' what you expect from your design. This works in most cases and saves a lot of guesswork on big, unfamiliar projects. It's not an integral part of JS though, so I wouldn't recommend learning it as a foundation.