Skip to content

Commit 848d693

Browse files
authored
Merge pull request scala#1171 from darjutak/master
September 2018 SIP minutes
2 parents 19946b7 + 1f335f4 commit 848d693

File tree

1 file changed

+214
-0
lines changed

1 file changed

+214
-0
lines changed
Lines changed: 214 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
1+
---
2+
layout: sips
3+
title: SIP Meeting Minutes - 24th September 2018
4+
5+
partof: minutes
6+
---
7+
8+
# Minutes
9+
10+
The following agenda was distributed to attendees:
11+
12+
|Topic|Reviewers| Accepted/Rejected |
13+
| --- | --- | --- |
14+
| Summary of the Contributors thread [“Proposal to remove XML literals from the language”](https://contributors.scala-lang.org/t/proposal-to-remove-xml-literals-from-the-language/2146) | Sébastien Doeraene | Pending
15+
| Summary of the Contributors thread [“Proposal to remove the procedure Syntax”](https://contributors.scala-lang.org/t/proposal-to-remove-procedure-syntax/2143) | Josh Suereth | Pending |
16+
| [Proposal to add Intersection Types to the Language](https://dotty.epfl.ch/docs/reference/intersection-types.html) | Martin Odersky | Discussion opened until the 25th October 2018, comments welcomed [here](https://contributors.scala-lang.org/t/proposal-to-add-intersection-types-to-the-language/2351) |
17+
| [Proposal to Add Union Types to the Language](https://dotty.epfl.ch/docs/reference/union-types.html) | Martin Odersky | Discussion opened until the 25th October 2018, comments welcomed [here](https://contributors.scala-lang.org/t/proposal-to-add-union-types-to-the-language/2352) |
18+
| [Proposal to add Implicit Function Types to the Language](https://dotty.epfl.ch/docs/reference/implicit-function-types.html) | Martin Odersky | Discussion opened until the 25th October 2018, comments welcomed [here](https://contributors.scala-lang.org/t/proposal-to-add-implicit-function-types-to-the-language/2353) |
19+
| [Proposal to add Dependent Function Types to the Language](https://dotty.epfl.ch/docs/reference/dependent-function-types.html) | Martin Odersky | Discussion opened until the 25th October 2018, comments welcomed [here](https://contributors.scala-lang.org/t/proposal-to-add-dependent-function-types-to-the-language/2354/1) |
20+
| [Proposal to add Trait Parameters to the Language](https://dotty.epfl.ch/docs/reference/trait-parameters.html) | Martin Odersky | Discussion opened until the 25th October 2018, comments welcomed [here](https://contributors.scala-lang.org/t/proposal-to-add-trait-parameters-to-the-language/2356) |
21+
22+
Jorge Vicente Cantero was the Process Lead and Darja Jovanovic was the secretary.
23+
24+
25+
## Date and Location
26+
The meeting took place on the 24th September 2018 at 5 PM CEST via Google Hangouts at EPFL in Lausanne, Switzerland as well as other locations.
27+
28+
[Watch on Scala Center YouTube channel](https://youtu.be/tEb4UF6RJrM)
29+
30+
31+
Minutes were taken by Darja Jovanovic and Jorge Vicente Cantero.
32+
33+
## Attendees
34+
35+
* Martin Odersky ([@odersky](https://github.com/odersky)), EPFL
36+
* Jorge Vicente Cantero ([@jvican](https://github.com/jvican)), Process Lead
37+
* Seth Tisue ([@SethTisue](https://github.com/SethTisue)), Lightbend
38+
* Iulian Dragos ([@dragos](https://github.com/dragos)), Triplequote
39+
* Eugene Burmako ([@xeno-by](https://github.com/xeno-by)), Twitter
40+
* Josh Suereth ([@jsuereth](https://github.com/jsuereth)), Independent
41+
* Sébastien Doeraene ([@sjrd](https://github.com/sjrd)), Scala Center
42+
* Adriaan Moors ([@adriaanm](https://github.com/adriaanm)), Lightbend
43+
* Darja Jovanovic ([@darjutak](https://github.com/darjutak)), Scala Center
44+
45+
## Not present
46+
* Miles Sabin ([@milessabin](https://github.com/milessabin)), Independent
47+
* Heather Miller ([@heathermiller](https://github.com/heathermiller)), CMU
48+
49+
## Proceedings
50+
### Opening Remarks
51+
52+
Jorge opens the meeting, explains SIP dynamics:
53+
Finalising discussion about the 1st batch, action points
54+
Introducing batch two
55+
Decision / voting / postponing the discussion
56+
57+
### Discussion of the first Scala 3 batch
58+
59+
#### [“Proposal to remove XML literals from the language”](https://contributors.scala-lang.org/t/proposal-to-remove-xml-literals-from-the-language/2146)
60+
([YouTube time 3’ - 16’50’’](https://youtu.be/gnlL4PlstFY?t=891))
61+
62+
**Sébastien** suggests to postpone the removal of XML and Procedure syntax, because when
63+
the removal takes place it will be a code breaking change, not a binary or
64+
tasty one. Adds it would be better to focus on changes that have an impact on
65+
tasty and binary format and deal with these later.
66+
67+
**Seth** ([YouTube time:4’54](https://youtu.be/tEb4UF6RJrM?t=294)) suggests to have a warning
68+
notes that it will eventually be removed.
69+
70+
**Eugene** asks what would be the positive effect of that change? And that we
71+
need to vote on it first.
72+
73+
**Iulian** asks what are the promises with regards to binary-compatible and
74+
source-compatible releases in Scala 3. To him it looks weird that we could
75+
break the source between 3.0 and 3.1.
76+
77+
**Josh** notes that by enforcing binary compatibility across Scala 2 and Scala
78+
3 we are sacrificing source compatibility. He asks for this decision to be
79+
more thought over as it is a big decision with lots of impact for Scala
80+
tooling. He agrees we can make source-breaking releases nicer to use in
81+
source-based build tools like Pants or Bazel, but trading off binary
82+
compatibility by source compatibility is not a decision to take lightly [more](
83+
https://youtu.be/tEb4UF6RJrM?t=612).
84+
85+
**Martin** thinks that no matter what trade-offs we do with regards to
86+
compatibility, he'd like to be able to remove XML literals in the first
87+
release of Scala 3.0 because having the XML spec inside the Scala spec gives
88+
a bad impression of complexity of the language, where he believes Scala is
89+
instead a more lightweight language than its competitors. There is no way he
90+
can make this argument if the XML spec continues to be in the relatively
91+
simple Scala language specification [more](https://youtu.be/tEb4UF6RJrM?t=916).
92+
93+
(The discussion with regards to binary compatibility and source compatibility trade-offs is postponed.)
94+
95+
#### [“Proposal to remove the procedure Syntax”](https://contributors.scala-lang.org/t/proposal-to-remove-procedure-syntax/2143)
96+
97+
([YouTube time: 16’50’’ - 19.28’’](https://youtu.be/tEb4UF6RJrM?t=1010))
98+
99+
**Jorge** reminds that in the last meeting we agreed that before moving forward with the change we needed:
100+
1. A better motivation
101+
2. A good explanation of why this change promotes the use of types (making it safer)
102+
3. A removal of the examples that were misleading
103+
4. A link to a Scalafix rewrite that could make a migration.
104+
105+
**Jorge** then points out that the changes need to be done in order to move
106+
forward, but is asking a Committee to voice their opinion about removing this
107+
feature in Scala 3.
108+
**Josh** underlines that there were 2 parts in the debate
109+
1) Are procedures different than a method, do we want them visually
110+
distinctive?
111+
2) Other issues listed by **Jorge** above. In particular, the fact that we want people to explicitly annotate the unit in their methods because it makes code more readable.
112+
113+
A decision will be taken into the future when all those items are acted on.
114+
115+
### Discussion of the second Scala 3 batch
116+
117+
An overview of the second batch can be found [in this Scala Contributors thread](https://contributors.scala-lang.org/t/second-batch-of-scala-3-sips-additions-to-scalas-type-system/2376). The batches under discussion are:
118+
119+
1. https://contributors.scala-lang.org/t/proposal-to-add-trait-parameters-to-the-language/2356
120+
2. https://contributors.scala-lang.org/t/proposal-to-add-intersection-types-to-the-language/2351
121+
3. https://contributors.scala-lang.org/t/proposal-to-add-union-types-to-the-language/2352
122+
4. https://contributors.scala-lang.org/t/proposal-to-add-dependent-function-types-to-the-language/2354
123+
5. https://contributors.scala-lang.org/t/proposal-to-add-implicit-function-types-to-the-language/2353
124+
125+
Feedback on these proposals is open until the 25th October 2018, as describe
126+
in the linked Scala Contributors thread.
127+
128+
#### [Proposal to add Intersection Types](https://dotty.epfl.ch/docs/reference/intersection-types.html) and [Union Types](https://dotty.epfl.ch/docs/reference/union-types.html) to the language
129+
130+
([YouTube time: 20’49’’ - 24'01](https://youtu.be/tEb4UF6RJrM?t=1250))
131+
132+
**Martin** presents the intersection types as per doc. He does a basic
133+
description of the feature and points out that intersection types are the
134+
duals of union types. He points out that union types have helped replace most
135+
of the lubbing mechanism and early precocious lubbing that happened in Scala
136+
2 (which happens in less degree in the current implementation of Scala 3 but
137+
could be improved in future releases). **Martin** also thinks that union
138+
types are useful for null safety, where any type coming from Java could be
139+
annotated as `T | Null`. He then goes on describing further implementation
140+
details and trade-offs that Scala 3 does in this space. **Adriaan** asks what
141+
are the trade-offs between the encoding of union types that we have in Scala
142+
and the one they use in other languages like Typescript. **Martin** points
143+
out that performance-wise Scala union types would be more performant because
144+
`T | Null` wouldn't box if `T` is a primitive type.
145+
146+
**Sebastien** ([YouTube time: 30’03’’](https://youtu.be/tEb4UF6RJrM?t=1803))
147+
gives his input based on the fact that Scala.js already has Union Types in
148+
Scala 2. He states that they are very limited; they were introduced for
149+
modeling because some libraries “desperately needed” them but turned out they
150+
were overused for no apparent reason. He advises to document the Union Types
151+
proper usage well and not get discouraged by the possible “overusage”.
152+
153+
There is some back-and-forth between **Sebastien** and **Josh** with
154+
regards to performance of union types and their boxing (especially in the
155+
presence of specialization). [More](https://youtu.be/tEb4UF6RJrM?t=1913)
156+
157+
#### [Proposal to add Implicit Function Types to the Language](https://dotty.epfl.ch/docs/reference/implicit-function-types.html)
158+
159+
([YouTube time: 39’01’’ - 43’11’’](https://youtu.be/tEb4UF6RJrM?t=2341))
160+
161+
**Martin** explains what implicit function types are about and points out it's
162+
a pretty “hot” feature that was published in POPL 2018.
163+
He underlines the advantages of implicit function types (like further
164+
abstraction of code that depends on a notion/representation of a context,
165+
like Scala 3's compiler) and points out that implicit function types can
166+
replace the reader monad, even though it's about 10x faster than the reader monad
167+
is. A comprehensive explanation of what implicit function types can do can be
168+
found in [Olivier's Blainvillain talk at
169+
ScalaDays, Berlin 2018](https://slideslive.com/38908156/applications-of-implicit-function-types).
170+
**Martin** thinks that implicit function types should be seen as the
171+
canonical way of doing scope injection, which gives you a lot of
172+
expressivity, to which **Sebastien** adds that what Martin means by canonical
173+
scope injection doesn't necessarily correspond with the way people do normal
174+
scope injection, because in normal scope injection you can't refer to
175+
identifier or parent scopes. **Martin** clarifies that for him comonadic
176+
abstraction are the classical way of scope injection in which we inject
177+
things into an environment, hence the use of canonical scope injection when
178+
referring to implicit function types which allow you to do the same. His
179+
definition of scope injection comes more from a typing rules perspective
180+
rather than the lexical point of view. **Martin** agrees that if there is a
181+
name clash with implicit function types there is a problem indeed.
182+
183+
#### [Proposal to add Dependent Function Types to the Language](https://dotty.epfl.ch/docs/reference/dependent-function-types.html)
184+
([YouTube time: 43’11’’ - 44’40’’](https://youtu.be/tEb4UF6RJrM?t=2591))
185+
186+
**Martin** mentions that dependent function types is the last big addition to Scala's type checker. The reason why they are added is because Scala has dependent methods and there is a need for dependent functions (the same rationale has been doing with regards to implicit methods and implicit function types). It's an obvious win because dependent function types allow us to abstract over the idea of implicit methods in functions, so the more we can do the better. Initially he was afraid of the feature because he thought it violated this Scala principle that in the end anything is an instance of a class in some way and it turned out that a new encoding of dependent function types made this initial argument moot. Dependent function types are now encoded as implicit function types with type refinements, so this way it doesn't violate that principle.
187+
**Adriaan** mentions that the last missing bit is polymorphic function types
188+
and Martin agrees and says that they are looking into that, but maybe not for
189+
Scala 3.0 (Guillaume Martres is pushing for polymorphic function types).
190+
191+
#### [Proposal to add Trait Parameters to the Language](https://dotty.epfl.ch/docs/reference/trait-parameters.html)
192+
193+
([YouTube time: 44’42’’ - end ](https://youtu.be/tEb4UF6RJrM?t=2682))
194+
195+
**Martin** describes trait parameters and says that they subsume a large number of use
196+
cases of early initializers. They were not added to Scala from the start because of
197+
uncertainty in the way they would work with regards to linearization and
198+
initialization of parameters. The way they solved this problem is by
199+
enforcing the rule that only the class extending a trait with parameters can
200+
pass the parameters. The motivation to add trait parameters is to regularize
201+
the language and get rid of early initializers which are an ad-hoc feature
202+
and are much harder to understand how to use correctly. Afterward, the
203+
Committee discusses some of the limitations of trait parameters.
204+
**Josh** ([YouTube time: 48’40’’](https://youtu.be/tEb4UF6RJrM?t=2920)
205+
suggests he will find one of his libraries that uses a lot of early
206+
initializers and see if trait parameters allow him to replace them. He's
207+
curious about how clean would the code look after the change.
208+
209+
**Jorge** then wraps up the meeting, points out how feedback on these
210+
proposals would work (check the following link
211+
*https://contributors.scala-lang.org/t/second-batch-of-scala-3-sips-additions-to-scalas-type-system/2376*)
212+
and finalizes the discussion.
213+
214+
**Conclusion** Next meeting will be dedicated to the Second Batch disscusion.

0 commit comments

Comments
 (0)