All objects can as well be implemented with message passing, a functional 
technique. However, if one would do it with stuartsierra/component, it 
would be so trivial that you could hardly call the lib object "orientated".


On Friday, June 19, 2015 at 11:14:04 AM UTC+2, Serzh Nechyporchuk wrote:
>
> OOP always talks about object (mutable or immutable) in terms of 
> polymorphism, encapsulation and inheritance. Components library misses only 
> inheritance, which, obviously, the "killer feature" in OOP. So we could say 
> that Components library that take good ideas from OOP. 
>
> If you want call something on load of module, make call to this something 
> explicit, ie: wrap it into a function and run on your system component 
> start explicitly. This approach will give more flexibility and control on 
> your state.
>
> 2015-06-18 13:08 GMT+03:00 Xiangtao Zhou <tao...@gmail.com <javascript:>>:
>
>> oop means object oriented programming, which doesn't mean mutable. record 
>> is oop and immutable. when you use java, you can asume everthing is 
>> immutable. 
>>
>> if i use dynamic to implement the object, i can test it with "binding"; 
>> others i can test with "with-redefs". so it works, except side effects.
>>
>> On Thursday, June 18, 2015 at 5:21:46 PM UTC+8, Atamert Ölçgen wrote:
>>>
>>> How is stuartsierra/component OOP when it is building an immutable 
>>> object graph? (Contrast that to Guava etc.)
>>>
>>> On Thu, Jun 18, 2015 at 5:15 AM, Xiangtao Zhou <tao...@gmail.com> wrote:
>>>
>>>> hi guys,
>>>>
>>>> Constructing simple clojure project is trival, just make functions. if 
>>>> the project grows large, with more datasources, message queue, and other 
>>>> storages, dependencies problem is on the table. 
>>>>
>>>> One solution is stuartsierra/component,  using system to configure 
>>>> dependencies graph, make component and dependencies resolution separate.
>>>>
>>>> If we make namespace must run with code block that init the namespace, 
>>>> like the "start" method in component, is this a good way to solve the 
>>>> dependencies?
>>>>
>>>
>>> You can do that. But it's not a really good idea to have top-level 
>>> side-effectful code within namespaces. How are you going to test that ns? 
>>> How will you do (stop)?
>>>
>>> Namespaces should only define things.
>>>  
>>>
>>>>
>>>> because when the namespace is required the first time, the init block 
>>>> worked once.
>>>>
>>>> any suggestion is appreciated.
>>>>
>>>>
>>>> - Joe
>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Clojure" group.
>>>> To post to this group, send email to clo...@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+u...@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+u...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> -- 
>>> Kind Regards,
>>> Atamert Ölçgen
>>>
>>> ◻◼◻
>>> ◻◻◼
>>> ◼◼◼
>>>
>>> www.muhuk.com
>>>  
>>  -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com 
>> <javascript:>
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com <javascript:>
>> 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+u...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Best regards,
> Serhii Nechyporchuk
>  

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