Oh… I thought if there is a module JSONParser that has a line @behavior Parser then I could just call JSONParser.parse!("some string") and the dispatch would happen correctly. Isn’t that how we use GenServer and then call the using class’s start_link instead of GenServer’s start_link, right?
How do I write a function that uses the callbacks in the behavior definition then?
Eg handle_call is a GenServer function that has a specific signature. How do I access the implementation’s functions in that case? A plain inputs or handle_data doesn’t work, and I can’t expect GenServer to call handle_data with the implementation module. does __MODULE__ correspond to the currently active module? Is there something like self in python?


















