On Tuesday, May 23, 2017 at 2:50:05 PM UTC+1, Rupert Smith wrote: > > I'm going to the upcoming Elm Europe conference, so I can talk to the core > devs there and see what they think of it. As I said before, perhaps its not > an 'architectural' direction that they like; on the other hand it does seem > both simple and useful. >
There was someone else who wrote a 'middleware' component for Elm, but did it with 'out messages' instead of as an effect module. There was a routing part that you put in you top-level update function. Let me see if I can find it... One criticism of elmq might be that it is not so transparent. So if a module sends a message, the Cmd for that is passed into the Elm kernel, and from then on it sort of disappears from the compilers view - the messages are untyped in so far as that they are Json.Encode.Values. There is no way for the compiler to check that whatever receives them has a matching type, or indeed that there is any receiver listening at all. At least with 'out messages' the type checking will flow across the modules. Of course there could still be a bug in code where the 'out messages' are ignored and not processed. It may be possible to improve the elmq API to mitigate these issues - for example, an option to discard messages when there is no receiver and so on. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.