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

SIP minutes: 2020 March 12 #1660

Merged
merged 1 commit into from Mar 23, 2020
Merged

Conversation

dwijnand
Copy link
Member

No description provided.

@SethTisue SethTisue requested a review from sjrd March 19, 2020 03:47
* Martin: I feel good about how it is now, I wouldn't change any detail on it
* Adriaan: it would be good to add a type ascription when exporting (`export A.T: Foo` to only export Foo's methods)
* Martin: that wouldn't be big, we could add that
* Gui: we could add refinements to the import, to select exactly the method used (`import A.T { def foo(x: Int): Int }`)
Copy link
Member

Choose a reason for hiding this comment

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

I'm pretty sure @smarter's comment here was about exports, not imports. So something like export A.T: { def foo(x: Int): Int }.

Copy link
Member

Choose a reason for hiding this comment

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

Also the syntax is:

export (A: Foo).T // already mentioned in https://contributors.scala-lang.org/t/request-for-comments-on-exports/4051/17
export (A: { def foo(x: Int): Int }).foo

You put the ascription on the value who's being upcasted, just like in regular code.
I think we also briefly touched on the fact that once we allow these sort of ascriptions for export, we could allow them on imports for symmetry, but that's not a very important point.

* Gui: why `inline msg: String`? Seeing as the semantics match just use `msg: => String`, just as the syntax, with the current codegen implementation.
* Gui: inline interacts with overriding
* Nic: if in a subclass (say Range) you override a method (say foreach) with `inline` it only inlines if the type is cast
* Seb: I need both, inline if statically the type is Range, and use the optimised override if it's a Seq that's a Range at runtime
Copy link
Member

Choose a reason for hiding this comment

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

This eventually led to scala/scala3#8543 and scala/scala3#8564. I suggest pointing at least to the former as it contains concrete results of the discussion that happened during the SIP meeting.

@sjrd
Copy link
Member

sjrd commented Mar 23, 2020

I'll merge this as is for now. Feedback still welcome and we'll adapt in another PR.

@sjrd sjrd merged commit 0ae2685 into scala:master Mar 23, 2020
@dwijnand dwijnand deleted the sip-minutes-2020-03-12 branch March 23, 2020 16:21
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

3 participants