You can put seqs in IFF you don't rely on them being cursors later.
I find it easier and safer to make sure they're always cursors. A place
this has caught me out is transferring seqs over Websocket and putting them
in app state. Now I always call vec (or use mapv or other alternatives as
appropriate).

This bites you if you try to use the data as a cursor (ie call transact! or
update! on it) - then you will get an error. If you simply consume the data
you likely won't notice.
 On 8 Sep 2014 22:14, "stephanos" <[email protected]> wrote:

> David, thanks for the clarification!
>
> I'm currently writing a blog series for complete LISP + CLJS + Om newbies
> (like me, obviously) based on the TodoMVC example. So I need to understand
> it first before I can explain it ... long way to go :)
>
> Stephan
>
>
> On Monday, September 8, 2014 11:08:08 PM UTC+2, David Nolen wrote:
> > No verification of what's in the app state. Not only that the system
> >
> > is completely open-ended, you can extend cursor-like capabilities to
> >
> > types I cannot possibly foresee.
> >
> >
> >
> > David
> >
> >
> >
> > On Mon, Sep 8, 2014 at 5:01 PM, stephanos <[email protected]>
> wrote:
> >
> > > I had (foolishly?) assumed that the whole app wouldn't even render
> properly and throw a bunch of exceptions if the root atom contained a
> non-associative data structure. And so we wouldn't ever arrive at the event
> handler, thus 'guaranteed' (maybe 'probable' would have been a better word).
> >
> > >
> >
> > >
> >
> > > On Monday, September 8, 2014 10:57:54 PM UTC+2, David Nolen wrote:
> >
> > >> On Mon, Sep 8, 2014 at 4:55 PM, stephanos <[email protected]>
> wrote:
> >
> > >>
> >
> > >> > I just found this in the Om wiki: "Everything in the atom should be
> an associative data structure - either a ClojureScript map or indexed
> sequential data structure such as a vector."
> >
> > >>
> >
> > >> >
> >
> > >>
> >
> > >> > Isn't it then guaranteed that 'todos' in the transact! update
> function is always an associative data structure? Or is the use of 'vec'
> just to 'play it safe'? It seems to work without it in this example.
> >
> > >>
> >
> > >> >
> >
> > >>
> >
> > >> > I'm just trying to understand, not nitpick :)
> >
> > >>
> >
> > >>
> >
> > >>
> >
> > >> Guaranteed how?
> >
> > >>
> >
> > >>
> >
> > >>
> >
> > >> David
> >
> > >
> >
> > > --
> >
> > > Note that posts from new members are moderated - please be patient
> with your first post.
> >
> > > ---
> >
> > > You received this message because you are subscribed to the Google
> Groups "ClojureScript" group.
> >
> > > To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected].
> >
> > > To post to this group, send email to [email protected].
> >
> > > Visit this group at http://groups.google.com/group/clojurescript.
>
> --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to the Google Groups
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/clojurescript.
>

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to