On Sat, 19 Mar 2022, Raul Miller wrote:
I do not need to carefully track which words are integers and which are
floats.
This is sometimes necessary. I've worked with examples where
distinguishing between numeric types has been a critical issue. I have
even encountered examples where the distinction between integer and
floating point was key.
Good point! I bumped into one instance of this recently: x^y for
nonnegative integers x and y is a float.
I think the broader point still applies, though. Take booleans and
integers, say, rather than floats and integers.
https://code.jsoftware.com/wiki/Essays/Deprecation
I think a deprecation period would probably be a good idea.
": does nothing to content which is already textual
Per the dictionary:
": converts literal2 and literal4 to U8 encoded 1-byte char
And experimentally:
]x=. 10 u: 243 244
óô
datatype x
unicode4
#x
2
":x
óô
datatype ":x
literal
#":x
4
Not specified is whether literal2 is interpreted as ucs-2 or utf-16.
Experimentally, it is utf-16.
The fill mechanism only presumes that the data is in a form which can be
filled with the default fill for that type. If that's not what you want,
you should avoid operations which add fill. For example, you may want to
use an expression like:
; verb each sequence
I don't understand the significance of this.
Generally speaking, if you want an unambiguous representation of your
data, you should use something like {{ 5!:5<'y' }} rather than ":
I don't need unambiguous. I'll take non-obfuscatory. And, as mentioned,
the behaviour of ": here is inconsistent with other primitives.
z is a perfectly good, valid utf-32 sequence.
Hmm... I suppose you are correct. Which means the problem here is that
it is not being displayed correctly.
The display seems correct to me.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm