changeset 19122:c43223245085

doc: Add warnings about eventual removal of inline functions. * NEWS: Announce eventual deprecation of inline. * func.txi: Document eventual deprecation of inline in manual. * ov-fcn-inline.cc (Fformula): Add seealso link to char.
author Rik <rik@octave.org>
date Sat, 20 Sep 2014 21:45:35 -0700
parents 3cb64f94294f
children c8f03ccdc9ee
files NEWS doc/interpreter/func.txi libinterp/octave-value/ov-fcn-inline.cc
diffstat 3 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Sat Sep 20 21:20:05 2014 -0700
+++ b/NEWS	Sat Sep 20 21:45:35 2014 -0700
@@ -84,6 +84,13 @@
       sylvester
       zoom
 
+ ** inline() scheduled for eventual deprecation by Matlab
+
+    Functions created through the use of inline are scheduled for deprecation
+    by Matlab.  When this occurs Octave will continue to support inline
+    functions for an indeterminate amount of time before also removing support.
+    All new code should use anonymous functions in place of inline functions. 
+
  ** Deprecated functions.
 
     The following functions have been deprecated in Octave 4.2 and will
--- a/doc/interpreter/func.txi	Sat Sep 20 21:20:05 2014 -0700
+++ b/doc/interpreter/func.txi	Sat Sep 20 21:45:35 2014 -0700
@@ -1404,6 +1404,10 @@
 After this it is possible to evaluate @math{f} at any @math{x} by
 writing @code{f(x)}.
 
+@strong{Caution}: @sc{matlab} has begun the process of deprecating inline
+functions.  At some point in the future support will be dropped and eventually
+Octave will follow @sc{matlab} and also remove inline functions.  Use anonymous functions in all new code.
+
 @DOCSTRING(inline)
 
 @DOCSTRING(argnames)
--- a/libinterp/octave-value/ov-fcn-inline.cc	Sat Sep 20 21:20:05 2014 -0700
+++ b/libinterp/octave-value/ov-fcn-inline.cc	Sat Sep 20 21:45:35 2014 -0700
@@ -853,9 +853,10 @@
        "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} formula (@var{fun})\n\
 Return a character string representing the inline function @var{fun}.\n\
+\n\
 Note that @code{char (@var{fun})} is equivalent to\n\
 @code{formula (@var{fun})}.\n\
-@seealso{argnames, inline, vectorize}\n\
+@seealso{char, argnames, inline, vectorize}\n\
 @end deftypefn")
 {
   octave_value retval;