[Users] Piraha in the Flesh

Erik Schnetter schnetter at cct.lsu.edu
Fri Feb 22 09:14:08 CST 2013


On Fri, Feb 22, 2013 at 10:09 AM, Frank Loeffler <knarf at cct.lsu.edu> wrote:

> Hi,
>
> On Fri, Feb 22, 2013 at 02:11:22PM +0100, Ian Hinder wrote:
> > I see that Piraha is written in C++, so we
> > would have to relax the restriction that the flesh can only contain C
> > code.
>
> I don't see a reason for this restriction anymore. In fact, using C++
> would make some of this code much more readable and maintainable.
> Speaking if C++ in the flesh: How strict was this in the past anyway;
> looking at src/main/flesh.cc from 1998, written by Tom? Of course, this
> is just a minimal C++ program, not using any of the features that past
> C++ compilers could have stumbled over.
>

The main program needs to be written in C++ to allow linking with other C++
code. At that time, the flesh was pure ANSI C.

However, times have changed. Carpet has proved that C++ is possible and
efficient on any interesting system. Our current policy is to allow C++
features, in particular if they lead to "better" (simpler) code, and if the
code is portable. That means in particular that C++11 features are probably
not a good idea, but using e.g. STL containers would be nice. In other
cases, preprocessor magic and code duplication may be replaced by templates.

-erik

-- 
Erik Schnetter <schnetter at cct.lsu.edu>
http://www.perimeterinstitute.ca/personal/eschnetter/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/users/attachments/20130222/4e66dc67/attachment-0001.html 


More information about the Users mailing list