octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A case for C++11 in Octave


From: Carnë Draug
Subject: A case for C++11 in Octave
Date: Fri, 14 Nov 2014 15:32:34 +0000

Hi

I would like to suggest we start making use of C++11 features in Octave.
It is been around for a while now and will have been around for even
longer by the time we release what's on the default branch.

I understand that the reason for not making use of it is to avoid making
users in ancient systems to build a recent compiler.
While I appreciate the value of being able to build on older systems, I'd
like to believe that users on such systems are either more interested on
older versions of Octave (they avoid upgrades, after all they're still
running CentOS 5 and without EPEL), or are capable enough to build gcc
themselves.

The reasoning is that we are paying a cost for not making use of C++11,
only to make things a bit easier (but far from impossible) on what
I believe to be a capable minority.  Yes, we can around the lack of features
added in C++11 but is the extra burden worth it?  This is not new, see
the following comment on [1]

  // FIXME: this would be simpler once C++0x is available

or [2]

  // FIXME: this mostly duplicates the code in the print_nd_array<>
  // function. Can fix this with std::is_same from C++11.

There are other occurrences in the source [3, 4, 5], and of course these
are only the cases where people actually wrote it down.

I don't mean that we should go back and start changing all the pieces
that could make use of C++11. I am only proposing that we start using
those features when using them makes our lives easier.

If the decision is to still keep away from C++11, can we decide on a set
of requirements before we can make use of it?  Something like, "it must
have been supported by compilers A, B, and C, for at least N years" or,
"distros A, B, and C must have dropped support for all releases that
still don't support it".

Carnë

[1] 
http://hg.savannah.gnu.org/hgweb/octave/file/1f4455ff2329/liboctave/array/Array.h#l750
[2] 
http://hg.savannah.gnu.org/hgweb/octave/file/1f4455ff2329/libinterp/corefcn/pr-output.cc#l2869
[2] 
http://hg.savannah.gnu.org/hgweb/octave/file/1f4455ff2329/libinterp/corefcn/jit-ir.h#l294
[3] 
http://hg.savannah.gnu.org/hgweb/octave/file/1f4455ff2329/libinterp/corefcn/toplev.cc#l290
[4] 
http://hg.savannah.gnu.org/hgweb/octave/file/1f4455ff2329/libinterp/corefcn/gcd.cc#l61
[5] 
http://hg.savannah.gnu.org/hgweb/octave/file/1f4455ff2329/liboctave/cruft/Faddeeva/Faddeeva.cc#l183



reply via email to

[Prev in Thread] Current Thread [Next in Thread]