Re: [elixir-core:7829] Re: [Proposal] Add GenServer.query and GenServer.handle_query

2018-01-30 Thread José Valim
The goal of the GenServer is to be generic and the functionality you ask for is already possible, so I prefer to stick with the generic APIs we have so far. Furthermore, introducing a new word also has downsides. Newcomers already wonder about call vs cast vs info, adding a new word will make thin

[elixir-core:7829] Re: [Proposal] Add GenServer.query and GenServer.handle_query

2018-01-30 Thread Ben Wilson
Have you evaluated an Agent for your purposes? It has basically exactly this function. On Tuesday, January 30, 2018 at 9:17:08 AM UTC-5, Federico Bergero wrote: > > Hi all, > I'm proposing a new GenServer callback `query` similar to the > call but which does not change the process stat