Skip to content

Conversation

gvozdvmozgu
Copy link
Contributor

No description provided.

Copy link

netlify bot commented Mar 23, 2025

Deploy Preview for dada-lang ready!

Name Link
🔨 Latest commit 986fc10
🔍 Latest deploy log https://app.netlify.com/sites/dada-lang/deploys/67e01fe984153f000864a1a1
😎 Deploy Preview https://deploy-preview-246--dada-lang.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

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

As I said, I was hoping to not have 1-tuples be a thing, but I can't really remember where I landed on that. Otherwise this looks good to me. Probably a good idea to land it as is and maybe we refine the 1-tuple case later.

I do have to warn you, I welcome the contribution, but I also wasn't expecting it, I'm still actively hacking on the type checker bits, so I wouldn't want major changes there so as not to get too many conflicts.

But I could probably close a bunch of issues and open up new ones, I have various ideas I want to pursue.

AstExpr::eat_comma_with_trailing_info,
)? {
let kind = if elts.len() == 1 && matches!(trailing, crate::Trailing::No) {
AstExprKind::Parenthesis(elts.pop().unwrap())
Copy link
Member

Choose a reason for hiding this comment

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

I would if possible like to eliminate the difference between 1-tuples and types. I forget why I thought this could work but that was my plan, which is why I didn't distinguish Parenthesis from tuple types.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now, in type position (i32) and in expression position (42), it's interpreted as a one-element tuple.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or did you mean that the type should be like tuple[..]?

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