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

Option to compile union types to typing.Union instead of subclasses #186

Open
dahlia opened this issue Oct 24, 2017 · 1 comment
Open

Option to compile union types to typing.Union instead of subclasses #186

dahlia opened this issue Oct 24, 2017 · 1 comment
Labels
cmp:compiler Component: Compiler backend (e.g., annotation processors, code generators) dfct:hard Difficulty: Hard target:python typ:enhance Type: Enhancement/new feature

Comments

@dahlia
Copy link
Member

dahlia commented Oct 24, 2017

E.g.:

@python-union("typing")
union payment-method = card | vbank;
@dahlia dahlia added cmp:compiler Component: Compiler backend (e.g., annotation processors, code generators) target:python typ:enhance Type: Enhancement/new feature labels Oct 24, 2017
@dahlia
Copy link
Member Author

dahlia commented Dec 8, 2017

Other suggestion:

record card (...);
record vbank (...);

unboxed union payment-method = card | vbank;

@dahlia dahlia added the dfct:hard Difficulty: Hard label Dec 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmp:compiler Component: Compiler backend (e.g., annotation processors, code generators) dfct:hard Difficulty: Hard target:python typ:enhance Type: Enhancement/new feature
Projects
None yet
Development

No branches or pull requests

1 participant