Brett Ryan wrote:
> @kirk
>
>   
>>> Properties are a 1-to-1 relationship of a classes member and the state
>>> it's representing,
>>>       
>> which is a violation of encapsulation and promotes unnecessary couplings.
>>     
>
> That 1-to-1 relationship is the encapsulation, and it's actually
> promoting the point.
>   
Encapsulation is about information hiding. If you directly expose the 
type, you've violated encapsulation. Properties are good at the edge of 
a system where you are forced to expose internal state. it my my humble 
opinion that properties have little business away from the edges.
>
>   
>>> To properly get closures, you need function pointers, and that's why
>>> we need them in Java, and with function pointers we can implement
>>> proper events fairly easily.
>>>       
>
>   
>> You need to make methods first class citizens and then you can implement
>> closures properly. Exposing pointer is something we want to avoid IMHO.
>>     
>
> To the casual C# programmer they wouldn't even know they were actually
> using function pointers. The language takes care of
>   
I'm all for making methods a first class citizen in the language. A 
method should be an object. For that matter, a class should be an object.
>   
>>>  since
>>> stateless code can't really listen to events in the first place.
>>>
>>>       
>> Why not?
>>     
>
> Well you can, but more so why would you? Events are more suited to
> something that is going to hang around for a while in a state-full
> fashion.
>   
I can think of a number of architectures that was both stateless and 
event driven and I've even implemented a few of them. Some of the 
EIPatterns are both event centric and stateless. This is how they are 
able to scale.

Regards,
Kirk


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to