A "by the way" this is how it looks using Sablano/Kioo would be nice in the tutorial.
On Mon, Jan 27, 2014 at 12:10 PM, David Nolen <dnolen.li...@gmail.com>wrote: > On Mon, Jan 27, 2014 at 12:48 PM, Mike Haney <txmikes...@gmail.com> wrote: > >> I was initially surprised by the implementation in your tutorial using >> multimethods instead of protocols, especially since you are only >> dispatching on a single function. But as I thought about it more, I >> realized this could be a perfect place for multiple dispatch, i.e. swapping >> components based on multiple pieces of application state. Powerful stuff! >> > > The problem with protocols is that they are type directed - I think for > most user interfaces you want something data directed. > > One question - I've tended to shy away from multimethods because of the >> performance hit, but this is a compelling case for their usage. Just how >> big of a performance hit are we talking about, compared to protocols or >> regular function invocation? > > > Multimethods are probably 4X-5X slower in ClojureScript then they should > be. I'll probably be looking into optimizing them in the near future. > However using them with Om is fine since they aren't really part of the > inner loop - all the time is going to be spent in React, not your > ClojureScript. > > 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 a topic in the > Google Groups "ClojureScript" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/clojurescript/pj6UwzP9QL4/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > clojurescript+unsubscr...@googlegroups.com. > To post to this group, send email to clojurescript@googlegroups.com. > 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.