>
> Well, the question is, where does this additional complexity come from. 
> In Java, it results in enormous quantities of boilerplate get/set 
> methods. In Scala, these are autocoded away. 
>

Boilerplate isn't complexity: It's inefficiency.

I'll grant that it creates complexity-potential-energy via many increased 
space for complexity to hide. However, it's far more complex to eliminate 
boilerplate via dynamic mechanisms, such as interface dispatch or, heaven 
forbid, Ruby-style abuses such as method_missing. Simpler is to eliminate 
boilerplate by developing terser encodings in terms of values, and bringing 
computation to bear to interpret (or translate) those values.

But I'll argue that avoiding the UAP isn't about complexity. It's about an 
intentional modeling of non-uniform access. Clojure data is built, 
constructively, out of lists, maps, sets, vectors, symbols, keywords, 
numbers, strings, etc. Any inductive data types, by the very nature of 
computation, are implemented in terms of co-inductive operations on codata 
types. You can't observe something in your computer without executing code 
to interpret some representation which models some abstraction. Any 
representation is built concretely out of the abstractions below it. By 
committing to :keyword style access, you're making a proclamation that 
you're operating on a "concrete" representation. If that concrete 
representation happens to be implemented abstractly (as it must be), you 
can override it (again with ILookup, etc). However, if you're going to 
override it, you damn well better provide value-like semantics.

UAP grants you flexibility in changing an abstraction. However, it grants 
*too much* flexibility. It lets you change from a convincing emulation of a 
true mathematical value to a full-blown computation object. Making 
operations on data source-incompatible with operations on codata is a 
feature, not a bug.

-- 
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.

Reply via email to