<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 02/22/2013 09:14 AM, Erik Schnetter
wrote:<br>
</div>
<blockquote
cite="mid:CADKQjjfRcD==YOS=v1qtBdvT9E_Cx4CEm5c+n_gXGWnQ4i9RpA@mail.gmail.com"
type="cite">
<div dir="ltr">On Fri, Feb 22, 2013 at 10:09 AM, Frank Loeffler <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:knarf@cct.lsu.edu" target="_blank">knarf@cct.lsu.edu</a>></span>
wrote:<br>
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<div class="im"><br>
On Fri, Feb 22, 2013 at 02:11:22PM +0100, Ian Hinder
wrote:<br>
> I see that Piraha is written in C++, so we<br>
> would have to relax the restriction that the flesh
can only contain C<br>
> code.<br>
<br>
</div>
I don't see a reason for this restriction anymore. In
fact, using C++<br>
would make some of this code much more readable and
maintainable.<br>
Speaking if C++ in the flesh: How strict was this in the
past anyway;<br>
looking at src/main/flesh.cc from 1998, written by Tom? Of
course, this<br>
is just a minimal C++ program, not using any of the
features that past<br>
C++ compilers could have stumbled over.<br>
</blockquote>
<div><br>
</div>
<div style="">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.</div>
<div style="">
<br>
</div>
<div style="">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.</div>
</div>
</div>
</div>
</blockquote>
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.<br>
<blockquote
cite="mid:CADKQjjfRcD==YOS=v1qtBdvT9E_Cx4CEm5c+n_gXGWnQ4i9RpA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div><br>
</div>
<div style="">-erik</div>
<div style=""> <br>
</div>
</div>
-- <br>
Erik Schnetter <<a moz-do-not-send="true"
href="mailto:schnetter@cct.lsu.edu" target="_blank">schnetter@cct.lsu.edu</a>><br>
<a moz-do-not-send="true"
href="http://www.perimeterinstitute.ca/personal/eschnetter/"
target="_blank">http://www.perimeterinstitute.ca/personal/eschnetter/</a>
</div>
</div>
</blockquote>
<br>
</body>
</html>