Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seq API parsing issue #268

Closed
ericzhang6222 opened this issue May 15, 2020 · 3 comments
Closed

Seq API parsing issue #268

ericzhang6222 opened this issue May 15, 2020 · 3 comments
Labels

Comments

@ericzhang6222
Copy link
Contributor

ericzhang6222 commented May 15, 2020

1.With code //seq.join(",",{}) and //seq.join(",",[]), both {} and [] are parsed to rel.GenericSet, I think [] should be pared to rel.Array.
2.With code //seq.join(",",["", "", ""]), "" is parsed to rel.GenericSet too, "" should be parsed to rel.String.

@ericzhang6222
Copy link
Contributor Author

@marcelocantos can you help to confirm?

@ericzhang6222 ericzhang6222 changed the title GenericSet parsing issue Seq API parsing issue May 15, 2020
ericzhang6222 added a commit that referenced this issue May 17, 2020
@ChloePlanet
Copy link
Contributor

Not a bug, all empty sets are the same. "", {} and [] are indistinguishable.

@marcelocantos
Copy link
Contributor

The suggested change would make it easier to implement the given functions under normal circumstances. However, since all empty sets are identical (that is, there is only one kind of empty set), the expressions //seq.join(",",{}) and //seq.join(",",[]) mean exactly the same thing and produce exactly the same result: {}. This is why the empty array is modelled as rel.None internally. I'm even thinking to add a Go type that represents the empty set so that GenericSet isn't considered special.

anzopensource pushed a commit that referenced this issue Jan 12, 2023
`(v: <value>)` may be used in some cases to encode arbitrarily-typed values (a play on the `%v` verb in Go string templating).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants