swannodette / lt-cljs-tutorial

A ClojureScript Programming Language Tutorial for Light Table Users
MIT License
863 stars 123 forks source link

Things I didn't understand #19

Closed jaredly closed 10 years ago

jaredly commented 10 years ago

Coming from a background of very little lisp and no clojure. If I'm not part of the target audience, then feel free to ignore these comments. Most of the tutorial was comprehensible and very instructive, however.

loop/recur not sure what's happening - is it a macro? b/c it doesn't look like a function call. What's the syntax mean?

defmulti the syntax is totally opaque to me.

protocols...are polymorphic functions? What's the difference between a protocol and a function? Or is that all it is? A bit more explanation would be much appreciated. For example, what's the significance of the word this in the following (defprotocol MyProtocol (awesome [this])). Changing it to "thing" or "cat" seems to have no effect.

Maybe if you showed the "ILookup" protocol definition or something it would make more sense.

Is there any difference between (extend-protocol protocol type ...) and (extend-type type protocol ...)?

Fantastic tutorial, on the whole!

swannodette commented 10 years ago

Thanks for the feedback, will work this in.

swannodette commented 10 years ago

I've hopefully addressed most of these in master.