We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This is specifically to address the need for having to call:
var m: &Map(Str, int) m = map::make(Str, int)
The information is already baked into the return type so it might be possible to infer it using this syntax:
def make -> &Map(type K, type V) { // use K and V here } m = map::make()
You could also do fancy things like overloading based on the return type:
def function -> type T { #if T == int { return 20 } else if T == Str { return "Some string" } else { ... } }
This does make overload resultion harder but it should be possible to implement by using a context type.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is specifically to address the need for having to call:
The information is already baked into the return type so it might be possible to infer it using this syntax:
You could also do fancy things like overloading based on the return type:
This does make overload resultion harder but it should be possible to implement by using a context type.
The text was updated successfully, but these errors were encountered: