Hi all,
having a compile-time-checked annotation "Pure" is a wonderful idea.. although it seems difficult to introduce purity in a non-pure language like Kotlin.
But anyway.. wouldn't it be a better way to restrict allowed calls by having a white-list instead of a black-list ?
That way, one maybe could include the "domain" packages of an application (plus java.lang and similar.. if needed)
I am referring to this:
https://github.com/arrow-kt/arrow-reflection/blob/6b8caa1c21861eb8a753f155b76af326[…]-reflect-annotations/src/main/kotlin/arrow/meta/samples/Pure.kt
Of course this is currently a proof-of-concept anyway, if I understand correctly (?)... so my question is not a feature request in this sense.
j
Javier
01/09/2023, 6:51 PM
As you said it is a proof of concept for the new incoming Arrow Meta infrastructure for compiler plugins but even if they are a proof of concepts we could keep a lot of them if they are used and any feature request is welcome 😄
r
raulraja
01/09/2023, 6:54 PM
@Jörg Winter If you'd like to play with it we can change it to whatever makes sense including the name which it's currently a placeholder for an example. We can't really detect purity without accounting for conditional branches etc which we don't do now. We just do a deep search on binaries and local module for the current call graph and if we find things in the list we disallow it. It can be extended to also support