[fpc-devel] Interface delegation fix: backport to FPC 2.4.2 ...?

Matt Emson memson.lists at googlemail.com
Thu May 20 11:58:56 CEST 2010


Graeme Geldenhuys wrote:
> Matt Emson het geskryf:
>   
>> Having used it a lot recently, I'd prefer MVC to be used with in a  
>> class library.
>>     
>
> MVC often uses Observer! 
 And? I've never said the observer pattern was bad. I've only ever said 
that retrofitting it is bad. If I advocated a new framework - MVC would 
be the direction I would like to see it go.

> Model-GUI-Mediator (MGM) 
>   

I'd prefer complete segregation of controller and view to be honest. 
Cleaner.

>> A Subscription mechanism is more powerful. Look at the MUSCLE C++  
>> framework.
>>     
>
> I don't know the Subscription mechanism using in Muscle C++, but from the
> name alone, it sounds exactly like what Observer does. 
It is like an uber-Observer. It allows Observable instances to specify 
what data they publish about themselves (think "nodes on a tree") and 
for the Subscribers to choose any/all of the items to observe. The 
Subscription mechanism can be internal, but equally cross process. The 
MUSCLE implementation of it works a lot like the Message passing in 
Haiku, but across various domains (e.g. TCP/IP comms between machines) 
with the notion of being able to specify a tree of published data items 
and a mechanism to subscribe to changes of those items.

>> As Marco said - the underlying framework is fundamentally flawed. You  
>> want to patch it. You need to redesign it. You are incredibly short  
>> sighted here. Think outside of the box.
>>     
>
> Yeah well, redesigning the RTL, FCL, LCL is not an option either. It will
> take the next 10 years to implement; 
Why? A complete rewrite might take some time, but equally you could fork 
the RTL, FCL, LCL and then refactor them over time, just as you seem to 
want to anyway. I don't see why this isn't your response anyway. Isn't 
that the "open source" way? Contribute/Refactor/Reject/Argue/Fork? :P
> you will loose all compatibility with Delphi and existing code....

Ah, so Delphi compatibility is important now? If you want to refactor 
the RTL as you state, you will still need to lose a certain amount of 
compatibility anyway. I don't see why this is an issue. Create a Facade 
if it is that important :)

> all because you only wanted to add one rather simple feature. 

Simple for who? Nothing about the Observer pattern is simple unless you 
understand what it is and why it exists.


>> Talk is cheap. I'm not using pascal enough to justify coding. But if I  
>> was doing this, I'd start again, as Marco suggests. 
>>     
>
> Yes, and I have bills to pay and no time to waist with such stupid ideas. 

I expect Marco feels the same way :)

> I code in Object Pascal for a living. 

Oh dear :-) I got off that horrible train wreck a few years back.

> Just because there is a problem 

Everything is a problem to someone. It's just one of those unfortunate 
realities one must deal with :)




More information about the fpc-devel mailing list