[Users] Piraha in the Flesh
Steven R. Brandt
sbrandt at cct.lsu.edu
Fri Feb 22 09:25:53 CST 2013
On 02/22/2013 09:14 AM, Erik Schnetter wrote:
> On Fri, Feb 22, 2013 at 10:09 AM, Frank Loeffler <knarf at cct.lsu.edu
> <mailto: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.
I believe that when the decision was made to not allow C++ templates
were an unstable feature and compilers could not reliably compile the
STL. But I agree with Erik. C++11 is not a good idea. In fact, I think
we might require that the flesh compile with -std=C++03 or something.
>
> -erik
>
> --
> Erik Schnetter <schnetter at cct.lsu.edu <mailto: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/4b10c798/attachment.html
More information about the Users
mailing list