Skip to content

Allow service methods to omit return value #179

Closed
@dahlia

Description

@dahlia

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.

Metadata

Metadata

Assignees

Labels

cat:langCategory: Language designcmp:compilerComponent: Compiler backend (e.g., annotation processors, code generators)cmp:transportComponent: Transportstarget:pythontyp:enhanceType: Enhancement/new feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions