Three syntax changes we'd like to push to Scala:
- Allow return type (and therefore effect) on constructors
class C(x: Int): C @pure extends D {
}
- Same thing for auxiliary constructors
class C extends D {
def this(x: Int): C @pure = { ... }
}
- Allow result type annotations without result type (meaning: infer type, but check effect)
def foo(x: Int): @pure = x + 1
The first two will eliminate the special cases for constructor effect annotations.
Three syntax changes we'd like to push to Scala:
The first two will eliminate the special cases for constructor effect annotations.