On Tue, Jul 17, 2018, 4:11 PM James Reeves <ja...@booleanknot.com> wrote:
> On Tue, 17 Jul 2018 at 21:06, Christian Seberino <cseber...@gmail.com> > wrote: > >> >> Clojure, on the other hand, takes great care to ensure that its data can >>> always be represented as literals. For data that isn't a standard >>> collection type, there are tagged literals. Clojure syntax starts from a >>> representation of data, and in order to really understand it, I think it >>> needs to be taught from this principle as well >>> >> >> Can you elaborate? I really want to get your point but I'm not so >> proficient with the lingo. What do you mean by a "literal" and "tagged >> literals"? >> > > A data literal evaluates to itself. So for example, `2` is a literal, > because we only need to read it to know its value, whereas `(+ 1 1)` > isn't a literal, because we also need to evaluate it to work out the value. > Fair enough. But by that definition function expressions are also literals. The (pedogogical) point being that there is no bright line between code (functions) and data. IMHO this is hugely important. Among other things it means you can pass a fn arg as data, which in my experience opens up design possibilities (or ways of thinking about problems) that are just unavailable in non-functional languages. That's my experience anyway. Regarding OP's issue: teach that conj et al. can be viewed both ways: as a fn that takes and returns a datum or a fn that takes and returns a fn. Enlightenment arrives when you see it's the same thing. G -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.