Meikel Brandmeyer wrote:
> On May 31, 3:15 pm, "Sina K. Heshmati" <s...@khakbaz.com> wrote:
> 
>> True but my main concern is security of a running application.
>> It could very well be that B is just a bunch of interactions,
>> in which case B can enter A's namespace.
> 
> ??? I'm not sure I understand. How can B "enter" the namespace
> of A? If you mean you have a Repl and someone arbitrary can
> enter commands there as she likes... You can always mess up
> everything.
> 
>> I still haven't tried to use reflection to see if I can still
>> access the state. In case a program can use metaprogramming
>> to access private fields of an abstraction, no matter what the
>> programmer does, then my concerns are not relevant.
> 
> To be honest: I don't see the problem. You talk about a very
> fuzzy "the user might do something". Do you have a particular
> scenario in mind?

You're right. It's rather a contract problem as you said than a security 
concern because no matter what we do, people can use reflection to mess things 
up anyway.

I'm likely to drop the whole idea of encapsulating the state in a closure and 
rely on private annotations.

Thanks Meikel for bearing with me :)

>> Problem solved.
> 
> Just some minor remarks: you can move the extend outside the
> let and the declare is not necessary. defprotocol will take
> care of that for you.

Nice. That's much better.

I'd like to thank Meikel, Krukow, and Adrian for participating in this 
discussion.

Kind regards,
SinDoc

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