3 ms·
> there's no guarantee that such a subset will be maintained There's no guarantee about Java either. This class compiles with Java 7, but not with Java 8:
by paulddraper 10y ago
> there's no guarantee that such a subset will be maintained
There's no guarantee about Java either. This class compiles with Java 7, but not with Java 8:
class SampleClass {
static class Baz<T> {
public static java.util.List<Baz<Object>> sampleMethod(Baz<Object> param) {
return null;
}
}
private static void bar(Baz arg) {
Baz element = Baz.sampleMethod(arg).get(0);
}
}
Like Java or any other good software, Scala will try to maintain backwards compatibility (particularly source compatibility).
- lmm 10y ago> There's no guarantee about Java either. This class compiles with Java 7, but not with Java 8: Ok, but you can compile it with the newer compiler by passing -source 1.7, right? And you can call into it from 1.8 code?
- paulddraper 10y agoYes, binary compatibility is maintained in this case.