Hey you guys! I've started to build out my first real Elm app and I'm 
loving it. On my model there is a field called items

 Model
    ...
    items : List Item
    ...

which is a list of the type Item. Coming from a rails mindset I created an 
"updateItemById" -function, which I use like this in my update
 case msg of
   ...
   OnSubmit updatedItem ->
       { model | items = updateItemById updatedItem }
but then it dawned on me that this does not read very well in this context. 
We'll be getting back a list of items, while "updateItem" implies that we 
are working with a single item. A CORRECT name for the function would be 
something like getNewItemsListWithReplacedItemById which works, but is not 
very elegant. Of course I could make it a little shorter, but you get the 
idea.

Any thinking going out there on around naming conventions OOP vs 
functional? I'd be grateful for any input on this matter of life or death!

-- 
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