I think the first solution (context/options argument) is the clearest and 
simplest. Yes, it's a bit verbose, but:

   - You can use the 'view' and 'viewWithOptions' pattern where the former 
   calls the latter with a default primary color etc., so you can get 
   convenience if you don't care about customizability
   - Users can easily do something like `myView = viewWithOptions 
   myOptions' in their own code and then just use that partially-applied 
   function everywhere (with the advantage that they can control exactly where 
   and how the partial application happens)
   - It's very clear what's going on - one of the things I love about Elm 
   is that it's much easier than other languages to trace the flow of logic 
   and see how things work without having to worry about hidden/implicit state 
   or context. Creating a module-like record seems to move a little ways in 
   the 'magic' direction...

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to