-
Notifications
You must be signed in to change notification settings - Fork 56
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
Support get value from tuple #99
Comments
That's a nice idea. I am unsure though if I want to implement this as a new syntax or simply as a builtin function. What do you think about e.g. |
If I think of it as an array rather than a tuple, I think that such a function notation is better. However, since I just want to get the value from the tuple, it doesn't matter which one I use. |
Hey, this would be also useful in the project I'm working on. I'm currently thinking about implementing it. Did you already start, if not I will be happy to make another pullrequest for it soon. |
I'm sorry, I'm thinking about how to implement it, but I can't think of a good one. |
for us, it would be also be great to have arrays(vecs) and objects(maps) to be compatible with serde_json some time in future. but I understand that woudl be a loooong way to go and I'm currently happy just having tuples. so I don't dare asking for it, but maybe I will come up with an array and object implementation draft in the future. That being said, the usual ways of writing it
|
Thank you for your interest in implementing this! I actually thought about the dot notation ( |
I want to get value at the index from a tuple.
e.g.
eval("(1,2,3,4).4") // 4
The text was updated successfully, but these errors were encountered: