Working in macro land lately where I would like to validate if the module is also a struct forces me to understand more technical things (which is good), where I wish more functions are defined in the Core where I can focus on the intention, especially that checking __struct__ (or any double-underscore prefix + suffix) feels too close to internals.
def defines_struct?(module) do function_exported?(module, :__struct__, 0) end Better naming welcome. Also, maybe do kind of the same around other internal things with the same intention. P.S: Credit to Jon R, thank you. -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/3a84dd3d-4211-4a95-8c22-0660422ff372n%40googlegroups.com.
