You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Opening as requested by @kayila after talking to her about it.)
While not restricting the return type is a reasonable default behavior for a scripting language, it would be nice to be able to opt-in to it when wanted.
I'm thinking something like this, where the -> int specifies the return type and is optional:
function factorial(int n) -> int {
if (n == 1) {
return 1;
}
return n * factorial(n - 1);
}
If no return type is specified, it'd probably make the most sense to not restrict it in any way.
The text was updated successfully, but these errors were encountered:
(Opening as requested by @kayila after talking to her about it.)
While not restricting the return type is a reasonable default behavior for a scripting language, it would be nice to be able to opt-in to it when wanted.
I'm thinking something like this, where the
-> int
specifies the return type and is optional:If no return type is specified, it'd probably make the most sense to not restrict it in any way.
The text was updated successfully, but these errors were encountered: