octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #50855] new Matlab string array syntax


From: Andrew Janke
Subject: [Octave-bug-tracker] [bug #50855] new Matlab string array syntax
Date: Fri, 11 Jan 2019 18:59:47 -0500 (EST)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36

Follow-up Comment #6, bug #50855 (project octave):

Gotcha. Thanks.

For the sake of discussion, here's an example of how a @string array could be
implemented as a userland M-code class built on top of cellstrs:
https://savannah.gnu.org/bugs/download.php?file_id=45939

It supports lexical casting and various other type conversions.

This approach works decently for string data analysis by users: it's a usable
datatype, and functions aimed at string manipulation will work well on it. For
text data sets, a user can create @string arrays and work with them usefully.

Where it works less well is all the various functions that take strings as
incidental arguments, like the plotting functions, property getter/setters,
statistical functions that take name/value pair arguments, and all the various
other miscellaneous functions. Packages (e.g. from Octave Forge) will also not
be @string-aware unless explicitly coded to be so.

Also, since this is based on cellstrs, the underlying "character" semantics
are still those of Octave chars. (That is, bag-of-bytes interpreted via
context or user locale settings? I'm not actually sure exactly how Octave
chars work.)

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?50855>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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