On Wed, Aug 17, 2016 at 5:40 PM, OvermindDL1 <overmind...@gmail.com> wrote:

> I do not consider elm-parts to not be pure TEA, I just consider it to make
> view/state combinations that are ID'd for separation, but I still consider
> it pure TEA.
>


Evan said in the sortable table Readme
<https://github.com/evancz/elm-sortable-table/blob/master/README.md>:

> One of the core rules of The Elm Architecture is never put functions in
> your Model or Msg types.


The elm-parts Msg is defined as:

type Msg c =
  Msg (c -> (Maybe c, Cmd (Msg c)))

This is why I consider the "without parts" the pure TEA.



> However, there is one niggle of irritant of elm-mdl/elm-parts that I am
> not sure can be worked around, and that is its 'ID', the fact you have to
> manually manage the number means that you can add in duplicates
> accidentally (such as duplicating a line to add something).  However we
> need the ID's to keep things not only distinct but to refer back to them as
> well.  What we need is some way to ensure there are no duplicates on
> generation and if so log a warning or something (there are also cases where
> duplicates are needed).  Currently this is not possible without having a
> parent view that walks the entire virtual node try via a to/from json hack
> or so again, which is painful and not done for possible breakage reasons in
> the future.
>

This is another reason to have this discussion.
Søren did the best he could with the technology he had at his disposal.
He has created something that removes some of the pain but introduces other
issues like the manual identity management that can lead to issues like the
one you describe.

There has to be a better solution.




-- 
There is NO FATE, we are the creators.
blog: http://damoc.ro/

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

Reply via email to