Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Curious if anyone can weigh in on why Flix requires a developer to explicitly mark a function as pure. I'd imagine in almost all cases this can be derived through static analysis.


I think if you mark a function as pure the compiler guarantees that this is indeed the case.


I could be wrong, but the sentence "Flix precisely tracks the purity of every expression in a program." together with some examples of function definitions without the purity/impurity annotation, gave me the impression it's optional, because the compiler can infer it on its own most of the time.


Just like const, private and static.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: