James Reeves <ja...@booleanknot.com> writes: >> Which is nice and simple, yes. And has negative consequences in terms of >> extensibility. I understand if you are happy with this compromise. But >> it is a compromise. >> > > I don't disagree, but I do consider the compromise to be a minor one. > > UAP has huge disadvantages in terms of complexity, repetition, scalability, > reliability, isolation, and a whole bunch of other things that Clojure is > explicitly trying to avoid. > > On the other hand, I can't personally recall a situation where it would > have actually been useful to me.
Okay. I can give you a very concrete example, and one where I think that it probably has been actually useful to you. Imagine you write the following piece of code: (first l) This returns a value. If we obeyed the universal access principle, however, we would not know whether this resulted from computational or otherwise. And, in fact, Clojure does exactly this. It's why you can write: (take 10 (range)) The argument that Clojure prefers data over APIs is, as far as I can see, just wrong. If that were the case, why not drop ISeq (which is an API) and use a cons cell (which is data)? Answer, because hiding the distinction between accessing data and performing computation allows you to do some very useful things. Including infinitely long sequences. In fact, that Clojure is built over abstractions (i.e an API) is a major selling point. The distinction of Clojure is not that it prefers data over APIs, but that it prefers relatively few APIs, reused where possible. Phil -- 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.