Thanks, that looks like something that I was looking for. I can experiment with hash function later. Hiding source files is not super critical, I'm more concerned about binary size and comparison speed. Also collisions may be a problem - actually I need a unique id.
The problem itself is related to Equality of functions. While hacking on proposal implementation, we keep using some workarounds in the codebase - by default we compare functions bitwise, but in some critical cases we use custom comparison keys. Such key should contain unique identifier of the function and captured values. This post is about the former.
What is the difference between @_transparent
and @inline(__always)
? From the documentation I've understood that @_transparent
is inlined before data flow analysis, and @inline(__aways)
- after. But what are the practical implications of that? What can data flow analysis catch in case of @_transparent
that it cannot with @inline(__always)
?