Skip to content

Commit 0ae2685

Browse files
authored
Merge pull request #1660 from dwijnand/sip-minutes-2020-03-12
SIP minutes: 2020 March 12
2 parents ab2c37d + d6526ea commit 0ae2685

File tree

1 file changed

+167
-0
lines changed

1 file changed

+167
-0
lines changed

_sips/minutes/2020-03-12-minutes.md

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
---
2+
layout: sips
3+
title: SIP Meeting Minutes - March 12 2020
4+
5+
partof: minutes
6+
---
7+
8+
# Minutes
9+
10+
The meeting took place with the following agenda:
11+
12+
1. Review given instances and context parameters
13+
2. Review given imports
14+
3. Extension methods
15+
4. Export clauses
16+
5. Review metaprogramming
17+
6. Review match types
18+
19+
## Date and Location
20+
21+
The meeting took place on the 12th March 2020 throughout the day at EPFL in Lausanne, Switzerland, and Zoom.
22+
23+
The meeting wasn't broadcast.
24+
25+
Minutes were taken by Dale Wijnand.
26+
27+
## Committee Attendees
28+
29+
* Martin Odersky ([@odersky](https://github.com/odersky)), EPFL
30+
* Adriaan Moors ([@adriaanm](https://github.com/adriaanm)), Lightbend
31+
* Guillaume Martres ([@smarter](https://github.com/smarter)), EPFL
32+
* Sébastien Doeraene ([@sjrd](https://github.com/sjrd)), Scala Center
33+
34+
## Sitting in
35+
36+
* Lukas Rytz ([@lrytz](https://twitter.com/lrytz)), Lightbend
37+
* Seth Tisue ([@SethTisue](https://github.com/SethTisue)), Lightbend
38+
* Jamie Thompson ([@bishabosha](https://github.com/bishabosha)), Scala Center
39+
* Nicolas Stucki ([@nicolasstucki](https://github.com/nicolasstucki)), EPFL
40+
* Olivier Blanvillain ([@OlivierBlanvillain](https://github.com/OlivierBlanvillain))
41+
* Aggelos Biboudis ([@biboudis](https://github.com/biboudis))
42+
43+
* Darja Jovanovic ([@darjutak](https://github.com/darjutak)), Process Lead
44+
* Dale Wijnand ([@dwijnand](https://twitter.com/dwijnand)), secretary
45+
46+
## Not present
47+
48+
* Heather Miller ([@heathermiller](https://github.com/heathermiller)), CMU
49+
* Iulian Dragos ([@dragos](https://github.com/dragos)), Triplequote
50+
* Josh Suereth ([@jsuereth](https://github.com/jsuereth)), independent
51+
* Miles Sabin ([@milessabin](https://github.com/milessabin)), independent
52+
53+
Miles notified the committee that he wouldn't be available. Josh, Heather, and Iulian were all unable to
54+
participate because of coronavirus-related travel restrictions and disruptions.
55+
56+
## Proceedings
57+
58+
### Review given instances and context parameters
59+
60+
* Martin: syntax wise, happy with what we have now
61+
* Martin likes `?=>` instead of `using`
62+
* Gui: but `using` is better for literal (expression level), and then for consistency should be for the type too
63+
* Seb: could use `?=>` at the literal side too, no?
64+
* Martin: we tried, but `using` felt more natural; there was pushback
65+
66+
Seb: the features are in good shape
67+
68+
* Gui: a summary from the implicit threads, kind of things people talked about
69+
* Gui: on the contributors threads on implicits there've been a lot of quesitons like "why do we have to the these set of changes? why are these the correct set of changes?"
70+
* Gui: in the docs we don't justify the changes, we don't have design decisions
71+
* Martin: that's because the docs target users
72+
* Gui: but for the SIP process we should
73+
* Gui: also users ask "why can't we just 'fix' the existing stuff?"
74+
* Gui: why instead of a big redesign let's just, for example, fix mulit-parameter implicit classes?
75+
* Martin: we need a fresh start that fixes the 6 different aspects systematically
76+
* Martin: some of the existing problems/bugs are just not fixable
77+
* Gui: people are uneasy with not knowing how things desugar
78+
* Martin: I still think this is within the bandwidth of what Scala's always done
79+
* Gui: another concern is for anonymous things, the compiler has to come up with a name, should we specify that scheme?
80+
* Seb: it's too fragile, for instance if you rename a type, the name changes, or a type parameter name, or whether it's fully qualified or partially imported
81+
* Martin: and the names are optimised to be short, and not optimised not to clash
82+
* Seb: we should highlight that well in the docs: library authors, name your instances (and your method extension given instances)
83+
84+
### Review given imports
85+
86+
* Gui: one inconsistency is that doing a named import of a given is without the `given` keyword: `import A.foo`
87+
* Gui: and IDEs will want to import the most specific thing, so the synthetic name of anonymous instances, particularly extension names
88+
* Gui/Seb: we could add `extension` to the import syntax
89+
* Dale: the previous discussion about libraries always wanting to name their given instances and extensions, most things will have good names
90+
* Dale: so if IDEs add imports with synthetic names in apps, doesn't seem to really matter
91+
92+
### Extension methods
93+
94+
* Gui: one difference between infix extension methods and grouped extension methods is that grouped they live in a given instance
95+
* Martin: people like the `extension` keyword, when we have it as only `given` people were confused by what these things were
96+
* Gui: one big difference with the status quo (Scala 2) of extension methods is you can't have two sets of type parameters, on the class and on the def, and people aren't pleased with that
97+
* Martin: eventually that will go when we have curried type parameters, which isn't a 3.0 thing
98+
* Gui: could we add `private` support to extension methods?
99+
* Martin: Actually I just tried it, we do allow private
100+
101+
### Export clauses
102+
103+
* Martin: addressing the problem that Scala don't assist encouraging composition (over inheritance)
104+
* Martin: side reasons are package object inhertance and exporting enum cases
105+
* Martin: the feedback is some want it to do more, some want it to do less
106+
* Martin: I feel good about how it is now, I wouldn't change any detail on it
107+
* Adriaan: it would be good to add a type ascription when exporting (`export A.T: Foo` to only export Foo's methods)
108+
* Martin: that wouldn't be big, we could add that
109+
* Gui: we could add refinements to the export, to select exactly the method (`export A.T: { def foo(x: Int): Int }`)
110+
* Martin: or users could just do it with a val `val x: Any { def a(x: Int): Int }`
111+
* Adriaan: I'm symapthetic to only allowing to export from static paths, we can always extend it to non static paths
112+
* Seb: the question is does the restriction buy us anything
113+
* Martin: importantly the forwarders are final, you can't overriden them
114+
* Gui: In TASTy should adding a method be TASTy compatible?
115+
* Seb: if we consider them implementation details, then no, you defined your API once, adding a method to the exported thing shouldn't propagate to where you previously exported it
116+
* Gui: export also "interacts" with visibility
117+
* Martin: so you can do `private export foo._`, but in order to you need access to foo at the definition point of the export
118+
* Gui: but now it's `export foo._` which includes all the package private things in `foo`
119+
* Dale: there's a precedent there with current (term and type) forwarders, but with this you can do lots at once, which aggravates the problem
120+
121+
### Review meta programming
122+
123+
(**Note: most of the time was spent going over the various feature changes, through the docs.**)
124+
125+
Run through https://dotty.epfl.ch/docs/reference/metaprogramming/inline.html
126+
127+
* Gui: why `inline msg: String`? Seeing as the semantics match just use `msg: => String`, just as the syntax, with the current codegen implementation.
128+
* Gui: inline interacts with overriding
129+
* Nic: if in a subclass (say Range) you override a method (say foreach) with `inline` it only inlines if the type is cast
130+
* 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
131+
* (After the meeting, this led to [lampepfl/dotty#8543](https://github.com/lampepfl/dotty/pull/8543) and [lampepfl/dotty#8564](https://github.com/lampepfl/dotty/issues/8564).)
132+
* Lukas: `inline` is perfect for macros, but it shouldn't exist for performance. The runtime is where performance should be fixed (and it's in a better position to do it)
133+
* Lukas: inlining isn't on by default (in Scala 2) because it interacts with binary compatibility in non-obvious ways, and `inline` in Dotty does the same
134+
135+
Run through https://dotty.epfl.ch/docs/reference/metaprogramming/macros.html
136+
137+
Run through https://dotty.epfl.ch/docs/reference/metaprogramming/staging.html, which adds a bit on top of the macro framework above, but can be compiled (and executed) at runtime
138+
139+
Run through https://dotty.epfl.ch/docs/reference/metaprogramming/tasty-reflect.html
140+
141+
* Gui: concerned how many compiler implementation details TASTy reflect exposes
142+
* Gui: should try to reduce it to the minimum of what users care about, for example, opaque types, and maintain backwards compatibility
143+
* Seb: I think we need to change things and, ultimately, things will have to change, so we can't ship this with API stability guarantees
144+
145+
### Review match types
146+
147+
Review https://github.com/dotty-staging/dotty/blob/fix-6709/docs/docs/reference/new-types/match-types.md (part of https://github.com/lampepfl/dotty/pull/8024)
148+
149+
```scala
150+
type LeafElem[X] = X match {
151+
case String => Char
152+
case Array[t] => LeafElem[t]
153+
case Iterable[t] => LeafElem[t]
154+
case AnyVal => X
155+
}
156+
```
157+
158+
* Olivier: The order of match type definitions is significant
159+
* Olivier: The disjointness is between `X` and `String`, not between `String` and `Array`
160+
* Olivier: See https://github.com/lampepfl/dotty/issues/8493 as an example of disjointness requirement (can't use traits)
161+
* Martin: Currently the use-cases can be implemented like Generic
162+
* Olivier: Put at a very high level, the intent is to remove some of the computation that happens in implicits and do it (better) in match types
163+
* Olivier: another problem is that when you type-check a type you can stackoverflow, which has bad UX, particularly given we have recursive types
164+
165+
## Next
166+
167+
The next meeting will be tomorrow, 13 March.

0 commit comments

Comments
 (0)