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

Any type #136

Closed
Jaguar-515 opened this issue Jun 16, 2020 · 2 comments
Closed

Any type #136

Jaguar-515 opened this issue Jun 16, 2020 · 2 comments

Comments

@Jaguar-515
Copy link
Contributor

Jaguar-515 commented Jun 16, 2020

The "any" type would be composed mostly of the currently supported types (or maybe all of the types?) in Cmdr.

I propose this because while working on an implementation of #121, I realized it would be difficult without having an any type since the list could be made up of booleans, numbers, etc.

This would be similar to TypeScript's any type implementation (or something like that).

@evaera
Copy link
Owner

evaera commented Jun 16, 2020

This doesn't make sense to me. Cmdr types are not algebraic so we can't really do this (we can't make a type out of other types). There is a proposal for a Variant type, which could be similar, but the best alternative right now is the string type. Since the arguments are already strings, the string type is effectively a raw data pass through, i.e. no parsing.

@evaera
Copy link
Owner

evaera commented Jun 16, 2020

#121 describes a few utility commands that could be used to operate on lists. There is no need for an any type here. You can just use the strings type.

@evaera evaera closed this as completed Jun 16, 2020
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

2 participants