Closed ngn closed 8 years ago
Some of these do appear to be bugs.
""
and ()
being equivalent is correct given the current behavior of oK's type system- oK does not presently distinguish between unitype and mixed type vectors for the sake of simplicity. k5 has some very odd edge cases as a result of how drawing this distinction interacts with various features. []
by itself is not a syntax error in k5, presumably denoting an empty dictionary. " / "
producing a parse error is very strange and may be a result of my parser being overly eager about consuming what it thinks is a comment.
Indexing dictionaries via []
, @
or juxtaposition, in the cases you show, should do the same thing.
k5 does not permit any form of indexing directly on symbols, even if they match a defined array for which the indexes would be valid, so oK is doing the wrong thing in at least the third case you demonstrate.
The literal "a"
represents a scalar value, so indexing it in any form should be a rank error. oK's error message in the second case is confusing and the third case is incorrect behavior.
It will take me a while to address all of these, but they're on my todo list.
The remaining issue here was corrected as part of https://github.com/JohnEarnest/ok/pull/34
Possibly not all of them wrong.
If my understanding is correct,
a[b]
,a@b
, anda b
should be equivalent. But: