top | item 44529656

(no title)

remon | 7 months ago

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.

discuss

order

teamonkey|7 months ago

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

zambal|7 months ago

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.

mrkeen|7 months ago

Just like const, private and static.