News for hackers. Stuff that matters.
Re:Configs suck? Try a real programming language by slifin on Sunday April 05, 2020 @08:24PM (#22789896)
It's shocking how little effort is put into developing static analysis compared to the insufferable amount of type system work that goes on

Here we're discussing destroying a data format and replacing it with a programming language because we can't be bothered to do static analysis on a data format?

LSP should have made this the golden era of static analysis, but instead everyone conflates type systems and static analysis so the industry gets myopic on typescript and friends

If you took static analysis out of typescript I wouldn't even give typescript a second look, meanwhile something like this where a given key should be one of a set we don't even consider how to do that without a type system

A data format doesn't have a type system and that's partly why they're great, type systems don't work across different programming languages but data does, data is a shared composable language

Data as a concept is more important than a type system and static analysis is more important than a type system

Re:Configs suck? Try a real programming language by rfoo on Sunday April 05, 2020 @09:02PM (#22790096)
Sorry, but I don't get how you express constraints you want your static analysis to enforce in stringly typed "data format" without out of the "format" type system e.g. JSON schema. Mind giving some hints?

Static analysis is not magic, they need some more inputs other than your code. I can't say for sure but Rust's success told me at least some people are happy to write annotations specifically targeted at static analyzer (Lifetime etc).

Re:Configs suck? Try a real programming language by int_19h on Tuesday April 07, 2020 @05:14PM (#22807530)
Can you define "static analysis" here? It sounds like you're talking about data schemas otherwise, but if you apply them statically, the end result is a type system, no? (XSLT/XQuery would be one example of that)