Skip to content
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

feat: release the turbofish #31

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

sivizius
Copy link
Contributor

@sivizius sivizius commented Nov 13, 2023

Unlike functions with anonymous generic arguments (foo: impl Bar), functions with named generic arguments can be called using the turbofish-notation foo::<Baz> in the case of the compiler unable to infer the type themself. IMHO, in library-methods, anonymous generics should be avoided. Hoewever, they are perfectly fine for internal methods and functions or in an initial implementation.

Unlike functions with anonymous generic arguments (foo: impl Bar),
functions with named generic arguments can be called using the
turbofish-notation `foo::<Baz>` in the case of the compiler unable to
infer the type themself. IMHO, in library-methods, anonymous generics
should be avoided. Hoewever, they are perfectly fine for internal
methods and functions or in an initial implementation.

In memory of Anna Harren.
@boustrophedon
Copy link
Owner

I actually didn't know you couldn't use turbofish with impl Trait parameters, thanks!

@boustrophedon boustrophedon merged commit c0289d9 into boustrophedon:master Nov 13, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants