Skip to content

Add RC1 blog article #11417

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

Merged
merged 1 commit into from
Feb 17, 2021
Merged

Add RC1 blog article #11417

merged 1 commit into from
Feb 17, 2021

Conversation

anatoliykmetyuk
Copy link
Contributor

@anatoliykmetyuk anatoliykmetyuk commented Feb 15, 2021

[skip ci]

@romanowski
Copy link
Contributor

I think we should mention that we settle on using scaladoc as build tool (together with scaladoc script). We've removed dotty-doc (or scala3-doc). It may also be important for some people that all Kotlin dependencies (Dokka, etc.) were removed from scaladoc.

@ShapelessCat ShapelessCat mentioned this pull request Feb 17, 2021
35 tasks
@@ -92,13 +92,13 @@ By contrast, type arguments matching type parameters following `extension` can b
only if the method is referenced as a regular method:
Copy link
Contributor

@ShapelessCat ShapelessCat Feb 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anatoliykmetyuk @odersky
It seems the "only if" is not right. Even though the code

List[String]("a", "bb", "ccc").sumBy(_.length)
List[String]("a", "bb", "ccc").sumBy[Int](_.length)

doesn't fit this context (they are not regular / non-extension method calls), they can work when I try them in Scala 3.0.0-RC1 REPL. If this is expected. I think it's better to edit this paragraph and keep all these 4 forms in this reference doc.

By the way, personally, the type arguments usage in the non-extension method call form looks weird.

Also, I think replace the "regular method" with "non-extension method" make this sentence clearer.
When I read this document before, since the code example doesn't fit the context, I didn't get the meaning of "regular". Also, since the extension method syntax is legal, it's also a kind of "regular" method.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. We should add all 4 forms.Can someone make a PR for that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not sure the List[String] form can be regarded as a way to pass type parameters to an extension method. We are not passing any parameters to the extension methods, we are helping the compiler to infer the type parameters of the callee precisely. It’s still on the compiler to then infer the type parameters for the extension method; I do not see how explicitly specifying the type parameter of the callee helps the latter task.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@odersky Here is the PR: #11451

var x: T = _
```

It defines a concrete variable x without an initial value, or rather the default initial value that the JVM assigns to object fields. It can only be used in a class or object, not to initialize a local variable.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just say null?

@anatoliykmetyuk anatoliykmetyuk merged commit e504518 into scala:master Feb 17, 2021
@anatoliykmetyuk anatoliykmetyuk deleted the rc1-blog branch February 17, 2021 16:51
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.