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

Comments

Projects
None yet
2 participants
@dahlia
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment