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

Allow service methods to omit return value #179

Closed
dahlia opened this issue Aug 26, 2017 · 0 comments
Closed

Allow service methods to omit return value #179

dahlia opened this issue Aug 26, 2017 · 0 comments
Assignees
Labels
cat:lang Category: Language design cmp:compiler Component: Compiler backend (e.g., annotation processors, code generators) cmp:transport Component: Transports target:python typ:enhance Type: Enhancement/new feature

Comments

@dahlia
Copy link
Member

dahlia commented Aug 26, 2017

Currently service methods can't have void/unit/null return type. Forcing every method to return something may sensible when we didn't have errors (#38), but no more now. In certain scenarios, no news is good news and we can raise an error when something goes wrong.

A syntax I would suggest is to simply omit method's return type:

service foo-service (
         bar (text value) throws bad-news,
    text baz (text value),
);

One more thing to consider is whether to force methods lacking return value to have error.

@dahlia dahlia added typ:enhance Type: Enhancement/new feature cat:lang Category: Language design cmp:compiler Component: Compiler backend (e.g., annotation processors, code generators) cmp:transport Component: Transports target:python labels Aug 26, 2017
@ipdae ipdae self-assigned this Dec 8, 2017
@ipdae ipdae closed this as completed Dec 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat:lang Category: Language design cmp:compiler Component: Compiler backend (e.g., annotation processors, code generators) cmp:transport Component: Transports target:python typ:enhance Type: Enhancement/new feature
Projects
None yet
Development

No branches or pull requests

2 participants