Different topic, but are you talking about fields in a record defined via
defrecord?   I thought those fields were not hidden (i.e. 'public').
"Encapsulation
of information is folly" as it says here:  http://clojure.org/datatypes.

I agree with your point.  Maybe a wee bit of encapsulation of information
isn't always folly!

Steve

On Tue, Aug 17, 2010 at 9:29 AM, Meikel Brandmeyer <m...@kotka.de> wrote:

> Hi,
>
> On 17 Aug., 04:40, cageface <milese...@gmail.com> wrote:
>
> > I'm not entirely sure how to interpret this. If a function is
> > expecting a certain argument structure, isn't it always better to
> > document that in a destructuring argument list? I'm finding that
> > destructured signatures generally help me track my dataflow better.
> > Can somebody elucidate this distinction a bit?
>
> It can overspecify things. Consider private fields of a record. The
> user should not fiddle with these, but you might well access them in
> your function. That you do so should be not of interest to the caller.
> Specifying it in the argument list would actually expose the caller to
> the details. So the details become part of the contract and you cannot
> change the internal workings of your library anymore.
>
> Sincerely
> Meikel
>
> --
> 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<clojure%2bunsubscr...@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 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

Reply via email to