Prefix/Odin | Require Return Type | Return Named Inputs | |
---|---|---|---|
Empty Procedure | proc() | () -> void | () |
1 input, unnamed | proc(int) | (int) -> void | |
1 input, named | proc(x: int) | (x: int) -> void | (x: int) |
1 input, 1 output | proc(int) -> int | (x: int) -> int | (x: int) -> int |
2 inputs, 2 unnamed outputs | proc(int, int) -> (int, int) | (int, int) -> (int, int) | (x: int, y: int) -> (int, int) |
0 inputs, 2 named outputs | proc() -> (a: int, b: int) | () -> (a: int, b: int) | |
2 inputs, 2 outputs, all named | proc(a, b: int) -> (c, d: int) | (a, b: int) -> (c, d: int) |
Advantages: Allows for any approach and any style of a procedure signature
Disadvantages: Requires an extra keyword or sigil
Advantages: Allows for most approaches of a procedure signature
Disadvantages:
Requires the concept of void
in the language
Advantages:
Does not require the concept of void
in the language, allow for the return value to be omitted
Disadvantages: It's worse than the other two styles in every other way