News for hackers. Stuff that matters.
Re:Lightweight Static Guarantees by awinter-py on Sunday August 11, 2019 @05:56PM (#20670803)
there are lots of properties app devs & library authors want to verify statically and languages aren't doing a good job of making this easy

JS (for example) has a bunch of 3rd-party type checkers (typescript, flow), and they're huge projects. And flow is even written in ocaml.

I've written static verification of non-type properties when my team absolutely needed it and it's never easy -- even things like AST walking can be rough and non-standard.

Would def try a language that had BYO static checks as a first-class concepts. Code generation is the closest thing to this IMO in widely used languages and even that is clunky in most places (go:generate, I'm looking at you).

Re:Lightweight Static Guarantees by rowanG077 on Sunday August 11, 2019 @07:27PM (#20671202)
Not really a language feature since it's compiler specific but you can relatively easily write static checks using clang-tidy which is a code analysis tool for C++.

http://blog.audio-tk.com/2018/03/20/writing-custom-checks-fo...