Topic: Modular programming support in C++
Author: Anonymous Infidel <messiah2999@yahoo.com>
Date: Fri, 27 Mar 2009 15:25:16 CST Raw View
> There is a paper - N2316 was the last incarnation, I believe - about
> introducing modules to C++. Last time I've seen it, it was in the
> "heading for a separate TR" category - meaning there are no plans for C
> ++0x (but then, it's already too late for any kind of major feature to
> get into C++0x, and this would certainly be one), but it may become a
> TR afterwards.
Nothing like waiting for what other languages take for granted.....Is
it to much to ask for parity?
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Author: baltasarq <baltasarq@gmail.com>
Date: Mon, 16 Feb 2009 15:04:27 CST Raw View
Hi, there !
> There is a paper - N2316 was the last incarnation, I believe - about
> introducing modules to C++. Last time I've seen it, it was in the
> "heading for a separate TR" category - meaning there are no plans for C
> ++0x (but then, it's already too late for any kind of major feature to
> get into C++0x, and this would certainly be one), but it may become a
> TR afterwards.
That's really interesting. I'll try to adhere to the suggestions in
that TR. Many thanks for your answer.
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Author: baltasarq <baltasarq@gmail.com>
Date: Fri, 13 Feb 2009 17:09:04 CST Raw View
Hi, there !
Don't know whether this is the best forum for this article, but you
can point me to the right place if not (well, provided you think it is
relevant).
The motivation for this article is that I think that support for
modular programming in C++ is very weak. It is difficult to explain to
newbies how to divide their code in modules, and it is difficult for
them to understand it. For seasoned programmers, it is annoying to
copy and paste the signature of a method from one file to another one,
as well as error-prone, also.
I have created a simple C++ program, called Cp3 that is in its initial
stage of development (v 0.1). Cp3 stands for C++ preprocessor, a
preprocessor that is able to let you program without declarations. In
short, you can write a class with it as you'd do it in Java or C#,
i.e., in the same file, without needing to write a .h and a .cpp
separate files.
All the information about Cp3 can be accessed through the following
url's.
There you'll find an still incomplete technical report, as well as
various demos (screencasts) in which you can see the program in
action. Finally, a test suite can be downloaded for Linux or Windows,
intallation consisting in unzipping the program in one folder while
uninstalling consists on deleting that folder.
Direct link:
http://trevinca.ei.uvigo.es/~jgarcia/prys/cp3/
Easier to remember link:
http://webs.uvigo.es/jbgarcia/research/
The program does only process .cp3 files, any other files
(specially .cpp and .h ones) are skipped (i.e., does nothing). This
means that can be easily added to any existing compiling chain for C+
+. Programs using the .cpp/.h approach would work the same, while new
programs can benefit from this new way of programming.
Keywords are not changed, they just mantain their meaning. The C++
language is unchanged.
I think that this (or something like this) could be added to the
standard for the new C++ 0x language. I can't think of any
disadvantages, while many people (specially newbies, but also C++
experts) could benefit from having true module programming support in C
++ (no #ifndef guarding marks, no .h/.cpp separation ... etc.).
Regards,
Baltasar
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Author: Pavel Minaev <int19h@gmail.com>
Date: Sat, 14 Feb 2009 09:42:35 CST Raw View
On Feb 13, 3:09 pm, baltasarq <baltas...@gmail.com> wrote:
> The motivation for this article is that I think that support for
> modular programming in C++ is very weak. It is difficult to explain to
> newbies how to divide their code in modules, and it is difficult for
> them to understand it. For seasoned programmers, it is annoying to
> copy and paste the signature of a method from one file to another one,
> as well as error-prone, also.
...
> I think that this (or something like this) could be added to the
> standard for the new C++ 0x language. I can't think of any
> disadvantages, while many people (specially newbies, but also C++
> experts) could benefit from having true module programming support in C
> ++ (no #ifndef guarding marks, no .h/.cpp separation ... etc.).
There is a paper - N2316 was the last incarnation, I believe - about
introducing modules to C++. Last time I've seen it, it was in the
"heading for a separate TR" category - meaning there are no plans for C
++0x (but then, it's already too late for any kind of major feature to
get into C++0x, and this would certainly be one), but it may become a
TR afterwards.
Here's the link to the paper:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2316.pdf
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]