Re: The Next Mainstream Programming Language: A Game Developer’s Perspective

"Rémy J. A. Mouëza" ray.jay.ay.moueza at do.not.spam.gmail.com
Mon Aug 28 05:17:24 PDT 2006


Marcio a écrit :
>     Replacing an existing method is always dangerous and was flagged in 
> ENVY/Developer (if memory serves me well) as a conflict. This is more 
> common for runtime system - patching is a clear example. Another clear 
> example of runtime modification is AOP (Aspect Oriented Programming) 
> where people can plug code into running code and do things like logging, 
> profiling, code coverage analysis etc.

AOP can also be done with a precompiler like AspectJ or AspectC++. 
However, compared to dynamic AOP ( using a dynamic language, with 
metaclases or reflexion ), it becomes more difficult to debug an weaved 
program because the aspects are scattered throughout the generated code 
thus it becomes less apparent what the programmer intended but tools 
exist, mainly for Eclipse ( I don't use it ).

>     Obviously CLOS people will probably say "we've been doing this for 
> decades", even inserting a class C between A and B (inheritance-wise).

Thanks to the power of reflexion and metaprogramming. It seems that D's 
TypeInfo classes could be considered as metaclasses. Maybe there is a 
way to use them to extend existing classes, and replace methods or wrap 
them around new ones.





More information about the Digitalmars-d mailing list