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

First class tuples #63

Open
12345swordy opened this issue Apr 14, 2020 · 8 comments
Open

First class tuples #63

12345swordy opened this issue Apr 14, 2020 · 8 comments

Comments

@12345swordy
Copy link

write a dip that makes tuples built into the language itself to avoid writing tuple!(....) and other unneeded verbiage.

@UplinkCoder
Copy link
Member

Do you mean tuple(), from std typecons?
or do you mean AliasSeq from std.meta?

In terms of aliasSeq that's something we actually need and I am working on it.

@12345swordy
Copy link
Author

tuple() from std typecons

@UplinkCoder
Copy link
Member

we are a strongly typed language, why don't you create a struct instead?

@12345swordy
Copy link
Author

12345swordy commented Apr 19, 2020

we are a strongly typed language, why don't you create a struct instead?

That is a complete non sequitur. C# is a strongly typed language, yet it has first class tuples built in.

@andre2007
Copy link

There is a tuple dip started some years ago https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md

@Geod24
Copy link
Member

Geod24 commented Apr 19, 2020

we are a strongly typed language, why don't you create a struct instead?

There's a difference between duck typing and structural typing.
That being said, there's a strong preference (or there was, from Andrei) to have things that can be built as library, be in a library, so this DIP is likely to be an uphill battle.

@12345swordy : Are you volunteering ?

@12345swordy
Copy link
Author

@Geod24 Yes I am willing to volunteer on this, if people are willing to assist me on this as I have time restraint on this.

@andre2007
Copy link

I wonder whether it makes sense to have it as a gsoc project: complete the DIP (https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md) and drive through the dip process?
Of course that means here is no coding at all to be written by the student...

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

No branches or pull requests

4 participants