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

RFC FS-1033 - Deprecate places where seq can be omitted. #788

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

edgarfgp
Copy link
Contributor

Click “Files changed” → “⋯” → “View file” for the rendered RFC.

@edgarfgp edgarfgp marked this pull request as ready for review October 4, 2024 19:34
@edgarfgp edgarfgp force-pushed the deprecate-places-where-seq-can-be-omitted branch from cefeb1b to 51654bf Compare October 4, 2024 19:38
@edgarfgp edgarfgp force-pushed the deprecate-places-where-seq-can-be-omitted branch from 51654bf to 2014d76 Compare October 4, 2024 19:48
let (..) _ _ = "Im an index range operator"

let x = { 1..10 } // Here the index range operator is being overridden and `x` will be a string instead of a sequence.
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will that be different when using seq {1..10}? According to the spec, also in this case the (..) operator will be used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • With index range operator being overridden
let (..) _ _ = "Im an index range operator"

{ 1..10 } // inferred as string

let str = { 1..10 } // inferred as string

let charSeq = seq  { 1..10 } // inferred  as char seq
  • Without index range operator being overridden
{ 1..10 } // inferred as int seq

let str = { 1..10 } // inferred as int seq

let intSeq = seq  { 1..10 } // inferred  as int seq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants