changeset 32338:e24b2f2881de

NEWS.9.md: Copy reminder from NEWS.8.md about future string changes
author Arun Giridhar <arungiridhar@gmail.com>
date Tue, 26 Sep 2023 08:24:02 -0400
parents c7e895118db1
children 4de460f3ffe0
files etc/NEWS.9.md
diffstat 1 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/etc/NEWS.9.md	Tue Sep 26 13:52:22 2023 +0200
+++ b/etc/NEWS.9.md	Tue Sep 26 08:24:02 2023 -0400
@@ -141,6 +141,23 @@
 
 - The default string length for the function `rats` has changed from 9 to 13.
 
+- *Continuing reminder of future breaking changes*:  There is ongoing work
+  to implement a Matlab-compatible string class that will differ from a vector
+  of characters.  In Octave, single-quoted character arrays are currently
+  compatible with Matlab, but double-quoted forms are not, and are likely to
+  change in future as a consequence of implementing Matlab-style string syntax.
+  For example, 'foo' will remain a three-element character vector, but
+  "foo" will become a single-element string object.
+
+  *What this means for user code*: If your code currently relies on
+  double-quoted strings (e.g., "foo") representing character vectors as
+  opposed to string objects, then start replacing all double-quoted strings
+  with single-quoted strings in your code over time (e.g., replace "foo" with
+  'foo'). Single-quoted strings are expected to retain current behavior.
+  Further, if your code relies on backslash escape sequence interpretation in
+  double-quoted strings (except in special cases like the `printf` family),
+  that code may need to change as well.
+
 ### Alphabetical list of new functions added in Octave 9
 
 * `isenv`