-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Trial balloon for fixes to given syntax #7150
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
Conversation
It'd be nice if we could address #7078 as well. |
I don't think I have an opinion about the first two, but I quite like |
@milessabin For #7078 , depending on how the other decisions go, we might just carve out some specialized syntax. E.g. something like: inline given mkAnnotations[A, T] as <: Annotations[A, T] =
${ AnnotationMacros.mkAnnotations[A, T] } |
Bikeshedding, but can't we do better than def apply[T](given Monoid[T]) = infer[Monoid[T]] or implied, instance, extract, there must be a keyword that fits the use case without being so cumbersome. |
Is it cumbersome? It's not any longer than |
the ticket for discussing |
Change contextual docs to reflect three changes to `given` syntax: - put `given` inside the parentheses of parameters and arguments, as was suggested by @smarter. - change given import syntax to make `given` an import selector - change `the` to `theGiven`. All of these should discussed in separate issues.
3aedf77
to
f6fb227
Compare
Following the discussion in scala#7151, choose `:` instead of `as` for given clauses.
f6fb227
to
6ed305b
Compare
Merged as part of #7201 |
Change contextual docs to reflect three changes to
given
syntax:given
inside the parentheses of parameters and arguments, as was suggested by @smarter.given
an import selectorthe
totheGiven
.All of these will discussed in separate issues.