3 ms·
> AST via reflection I literally am a paid ML compiler engineer and I have no idea what this means. You understand that reflection, ala looking in a mirror is
by almostgotcaught 2y ago
> AST via reflection
I literally am a paid ML compiler engineer and I have no idea what this means. You understand that reflection, ala looking in a mirror is about being about to identify a type's type at runtime. It has nothing to do with the AST.
- bronxbomber92 2y agoAn example of “AST via reflection” https://docs.scala-lang.org/scala3/reference/metaprogramming/reflection.html https://docs.scala-lang.org/scala3/reference/metaprogramming...
- brap 2y agoCongratulations, but that's not what reflection means. Wikipedia: "reflection is the ability of a process to examine, introspect, and modify its own structure and behavior." Would you say inspect.getsource(func) fits the definition of reflection? Would you say ast.parse(inspect.getsource(func)) has something to do with the AST?
- almostgotcaught 2y ago> Would you say inspect.getsource(func) fits the definition of reflection? I would say that reflection is absolutely meaningless in an an interpreted runtime because you can always query the runtime. > Would you say ast.parse(inspect.getsource(func)) has something to do with the AST? It has something to do with the AST but it doesn't have much to do with reflection.