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

Inherent type of tuple constructor expression #61

Closed
jclark opened this issue Apr 14, 2019 · 1 comment
Closed

Inherent type of tuple constructor expression #61

jclark opened this issue Apr 14, 2019 · 1 comment
Labels
Area/Lang Relates to the Ballerina language specification spec/improve Something that should be improved in the spec status/pending Design is agreed and waiting to be added
Milestone

Comments

@jclark
Copy link
Collaborator

jclark commented Apr 14, 2019

Tuple constructor should always create a value with inherent type that is fixed length, regardless of whether there is a contextually required type. Relates to issue #51.

When there is no contextually required type, inferred inherent type is fixed length and allows each field to have its own type.

When there us a contextually required type, it is truncated to be of fixed length (the parts after the fixed length must be optional or it would not type check).

Consider whether to change terminology to better reflect semantics, e.g. fixed length list constructor.

@jclark jclark added Area/Lang Relates to the Ballerina language specification spec/improve Something that should be improved in the spec labels Apr 14, 2019
@jclark jclark added this to the 2019R1 milestone Apr 14, 2019
@jclark jclark added the status/pending Design is agreed and waiting to be added label Apr 14, 2019
@sanjiva
Copy link
Contributor

sanjiva commented Apr 21, 2019

+1 to a terminology change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/Lang Relates to the Ballerina language specification spec/improve Something that should be improved in the spec status/pending Design is agreed and waiting to be added
Projects
None yet
Development

No branches or pull requests

2 participants