I have written an article on how to do Aspect Oriented Programming in
vanilla C++ (i.e. without language extensions or other tools such as
AspectC++). The article is available at http://www.heron-language.com/aspect-cpp.html. I would appreciate some
feedback on the article, and also I would like to know whether I am
repeating some prior work.
Thanks in advance!
--
Christopher Diggins
yet another language designer http://www.heron-language.com
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.m oderated. First time posters: Do this! ] 15 3064
On 8 Feb 2004 19:48:44 -0500, "christophe r diggins"
<cd******@users .sourceforge.ne t> wrote in comp.lang.c++: I have written an article on how to do Aspect Oriented Programming in vanilla C++ (i.e. without language extensions or other tools such as AspectC++). The article is available at http://www.heron-language.com/aspect-cpp.html. I would appreciate some feedback on the article, and also I would like to know whether I am repeating some prior work.
Thanks in advance!
I can't speak to the quality of the article itself, nor whether it
repeats prior work, as I haven't researched Aspect Oriented
Programming before, but I have an issue with the code sample.
The sample program on the page is quite useless for most of the C++
compilers in existence.
// This is a small application to illustrate aspect oriented programming techniques // using only C++ (i.e. no language extensions or special pre-processors
Ok, but how does that rationalize with:
#include "stdafx.h"
.....and:
int _tmain(int argc, _TCHAR* argv[])
.....neither of the lines above is standard C++, and neither will
compile on most compilers out there. Or does "vanilla C++" mean
something else?
If you want to make the point that AOP is for standard C++, and is not
just some new Microsoft/Windows specific extension, I would suggest
you produce an example that actually is "vanilla C++" and not just
Visual C++ specific.
--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.l earn.c-c++ http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.m oderated. First time posters: Do this! ]
christopher diggins wrote: I have written an article on how to do Aspect Oriented Programming in vanilla C++ (i.e. without language extensions or other tools such as AspectC++). The article is available at http://www.heron-language.com/aspect-cpp.html. I would appreciate some feedback on the article, and also I would like to know whether I am repeating some prior work.
Before I read, I'l ask a question that commits me to work hard when reading:
If we can implement Aspectism in vanilla C++, doesn't that suggest that
Aspectism is a Pattern, not a Paradigm or an Orientation?
--
Phlip http://www.xpsd.org/cgi-bin/wiki?Tes...UserInterfaces
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.m oderated. First time posters: Do this! ]
Hi,
christopher diggins wrote: I have written an article on how to do Aspect Oriented Programming in vanilla C++ (i.e. without language extensions or other tools such as AspectC++). The article is available at http://www.heron-language.com/aspect-cpp.html. I would appreciate some feedback on the article
You state in this article that the technique uses only Standard C++.
To fully support this claim, it would be good to resign from #include
"stdafx.h", TCHAR and other Microsoft-related stuff. ;)
Anyway - the article got me thinking a bit and ask myself the following
question:
If I call this technique a "compile-time Decorator pattern", would it be
really wrong?
If not (ie. if there is some merit in stating that this is *just* a
Decorator pattern implemented staticly with the help of preprocessor),
then: what is reason to name it Aspect-Oriented Programming?
Note also that your technique uses more "wrapping" than "interleavi ng"
(that's why I tend to call it Decorator, not AOP) when composing
complete components.
I may be wrong in this Decorator vs. AOP comparison.
I think that AOP calls for some new approach to development, including
completely new language features, or maybe a separate language in
itself. Using macros to compose wrapped function calls is probably good
for adding instrumentation to code (logging, etc.), but as for "true"
AOP it is still insufficient.
These are just my thoughts and I will be more than happy to learn
others' opinions.
Thank you for sharing this text with the community,
--
Maciej Sobczak : http://www.msobczak.com/
Programming : http://www.msobczak.com/prog/
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.m oderated. First time posters: Do this! ]
"Maciej Sobczak" <no*****@no.spa m.com> wrote in message
news:c0******** **@atlantis.new s.tpi.pl... Hi,
christopher diggins wrote:
I have written an article on how to do Aspect Oriented Programming in vanilla C++ (i.e. without language extensions or other tools such as AspectC++). The article is available at http://www.heron-language.com/aspect-cpp.html. I would appreciate some feedback on the article You state in this article that the technique uses only Standard C++. To fully support this claim, it would be good to resign from #include "stdafx.h", TCHAR and other Microsoft-related stuff. ;)
I apologize for having been so Microsoft-centric. There is now a new version
that is more general.
Anyway - the article got me thinking a bit and ask myself the following question:
If I call this technique a "compile-time Decorator pattern", would it be really wrong?
I do not know what you mean by that. I am aware of a Decorator pattern but a
compile-time Decorator pattern is a new one.
If not (ie. if there is some merit in stating that this is *just* a Decorator pattern implemented staticly with the help of preprocessor), then: what is reason to name it Aspect-Oriented Programming?
Because it allows the separation and isolation of cross cutting concerns in
a reusable manner.
Note also that your technique uses more "wrapping" than "interleavi ng" (that's why I tend to call it Decorator, not AOP) when composing complete components.
AFAICT it interleaves with existing code just as well as AspectJ or
AspectC++ does. Do you see examples which contradicts this?
I may be wrong in this Decorator vs. AOP comparison.
There may be some truth to what you say, but the implementation does not
discount the technique used. I could make a very similar argument about
object oriented programming.
I think that AOP calls for some new approach to development, including completely new language features, or maybe a separate language in itself.
What do you base that statement on?
Using macros to compose wrapped function calls is probably good for adding instrumentation to code (logging, etc.), but as for "true" AOP it is still insufficient.
There are many examples of how the proposed crosscutting macro could be used
: exception handling (not fully implemented as shown but trivial to add),
call prevention, testing of class invariants, introduction of preconditions
and postconditions, thread synchronization , real time constraints, resource
allocation / deallocation, etc. See http://www.heron-language.com/aspect-programming.html for some more
examples, Heron uses a similar technique to the one proposed for C++.
I would like to see you back up the statement about insufficiency for AOP.
These are just my thoughts and I will be more than happy to learn others' opinions.
Thank you for sharing this text with the community,
My pleasure.
--
Christopher Diggins
yet another language designer http://www.heron-language.com
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.m oderated. First time posters: Do this! ]
"Phlip" <ph*******@yaho o.com> wrote in message
news:R4******** ***********@new ssvr16.news.pro digy.com... christopher diggins wrote:
I have written an article on how to do Aspect Oriented Programming in vanilla C++ (i.e. without language extensions or other tools such as AspectC++). The article is available at http://www.heron-language.com/aspect-cpp.html. I would appreciate some feedback on the article, and also I would like to know whether I am repeating some prior work. Before I read, I'l ask a question that commits me to work hard when
reading: If we can implement Aspectism in vanilla C++, doesn't that suggest that Aspectism is a Pattern, not a Paradigm or an Orientation?
IMHO no.
--
Christopher Diggins http://www.heron-language.com
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.m oderated. First time posters: Do this! ] ph*******@yahoo .com (Phlip) wrote (abridged): If we can implement Aspectism in vanilla C++, doesn't that suggest that Aspectism is a Pattern, not a Paradigm or an Orientation?
We can implement object orientation in plain C, by juggling pointers
to functions by hand. Does that mean object orientation is a Pattern?
-- Dave Harris, Nottingham, UK
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.m oderated. First time posters: Do this! ]
"Phlip" <ph*******@yaho o.com> wrote in message news:<R4******* ************@ne wssvr16.news.pr odigy.com>...
[...] Before I read, I'l ask a question that commits me to work hard when reading:
If we can implement Aspectism in vanilla C++, doesn't that suggest that Aspectism is a Pattern, not a Paradigm or an Orientation?
Well, if you consider that it's orthogonal to Object Orientation... ;-)
Cheers,
Nicola Musatti
P.S. Sorry, I couldn't resist :-)
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.m oderated. First time posters: Do this! ]
Jack Klein <ja*******@spam cop.net> wrote in message news:<k5******* *************** **********@4ax. com>...
<snip> #include "stdafx.h"
....and:
int _tmain(int argc, _TCHAR* argv[])
....neither of the lines above is standard C++, and neither will compile on most compilers out there. Or does "vanilla C++" mean something else?
<snip>
#include "stdafx.h" isn't standard C++? Why not?
Cheers,
Dave
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.m oderated. First time posters: Do this! ]
> Before I read, I'l ask a question that commits me to work hard when
reading: If we can implement Aspectism in vanilla C++, doesn't that suggest that Aspectism is a Pattern, not a Paradigm or an Orientation?
So if we can implement a functional program in vanilla C++, does that
suggest FP is a Pattern or a paradigm?
Why do you suggest that just because we can implement something in C++ that
it must be a pattern rather than a paradigm?
JK
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.m oderated. First time posters: Do this! ] This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics | |
by: Hung Jung Lu |
last post by:
Hi,
I have been looking into AOP (Aspect-Oriented Programming) for
sometime, now. I frankly don't like the syntax of any of the
approaches I have seen so far. I am kind playing around with some
ideas, and maybe write up an article later.
AOP is not just buzzword. It's not just callback, it's not just Ruby's
MixIn, it's not just Python's metaclass, it's not just C++'s template.
AOP can be implemented/considered as a subset of...
|
by: New_aspect |
last post by:
Hello,
Aspect oriented Software development seems to be expanding in the
popular vision of developers, with more and more IDE 'add-ons' and
even more specialized tools,Jboss etc.
I've seen more and more languages integrate AOP,AspectJ (Java),
AspectR(Ruby)etc.Aspect oriented does seem to be the place to go from
a developer standpoint.What I want to know is,if anybody on a
commercial scale is using AOSD to develop commercial products? Is...
|
by: Flare |
last post by:
Hi,
I heard alot of IoC containers and aspect oriented programming for the Java
/ J2EE world, eg, Spring, AspectJ, Pico, etc.
I find the idea very compeeling that the framework calls the obejct instead
of the objects call some kind of static factory. More over the aspect
oriented way eg. to do logging also seems quite interesting. Is these things
possible in .net? Are there any interesting and production ready solutions
out there?
|
by: cmrchs |
last post by:
Hi,
I'm looking for a good Aspect-compiler + clear tutorial enabling me to experiment a little with the world of Aspect oriented Programming.
Anybody knows some good sites ?
Any help greatly appreciated
Chris
**********************************************************************
|
by: marathikaka |
last post by:
Hi all just wondering will the next hype be aspect oriented
programming.
I was reading through this link and just thought about it
http://www.geocities.com/aspectdotnet/
| | |
by: Dale |
last post by:
I've searched Amazon and read probably 100 reviews but can't find what seems
to be any book that is widely accepted as the definitive book on object
oriented programming design and techniques. And most of the highest rated
are all written 10 to 15 years ago. Any good suggestions?
|
by: scottrm |
last post by:
I am fairly new to oo design and I am looking at developing an object
oriented asp.net application which will be built on top of a relational
database. I have read quite a bit of the theory but find it hard to put it
into practice. In particular I am confused in terms of interacting with the
database. It seems to me classes map quite closely to database tables and I
end up with a bunch of methods in each class which simply call stored...
|
by: Thierry Chappuis |
last post by:
Hi,
I'm interested in techniques used to program in an object-oriented way
using the C ANSI language. I'm studying the GObject library and Laurent
Deniau's OOPC framework published on his web site at
http://ldeniau.web.cern.ch/ldeniau/html/oopc/oopc.html. The approach is
very instructive. I know that I could do much of this stuff with e.g.
C++, but the intellectual challenge of implementing these concepts with
pure ANSI C is relevant to...
|
by: ajba74 |
last post by:
Hi fellows,
I am reading some books to learn the C programming language, and
sometimes I have the feeling that when somebody becomes a C expert, he
must learn a more modern and object-oriented language.
When I read things like "... C++ is an evolution of C ..." or "... C
is a subset of C++ ..." I tend to believe that I will have to learn C+
+ sooner or later. It sounds like C++ is the future and C is the past
(and will be no longer...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| | |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| | |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |