facets

Sean Kelly sean at f4.ca
Wed Mar 1 10:02:22 PST 2006


Kevin Bealer wrote:
> I like the on_scope_exit() and friends, by the way.
> 
> But it got me thinking about an idea I had.  It's a bit like aspect
> oriented programming, but that is usually done with classes.  This is
> a function based one.  The name I'm thinking of for this is "facet
> programming", sort of suggesting "function based aspects".
> 
> The idea is to have semi-independent functions that can be "zipped"
> together at specified points to combine different implementations of
> sub-functionalities, or to add and remove those elements.

I really like the potential of AOP in general, however this seems more 
of a proposal to add language support for concurrent programming.  And 
while I think that idea has merit as well, I'm not sure I want to 
confuse the two.  In my experience, AOP is a way to inject functionality 
into arbitrary code blocks without the need to do so manually.  This can 
be invaluable during maintenance if a need arises that the original code 
wasn't designed for, as it doesn't require the original code to have 
made any attempt at allowing for such code injection.  But parallelism 
is a separate issue as far as I'm concerned.


Sean



More information about the Digitalmars-d mailing list