Fork me on GitHub
#clojure-dev
<
2018-01-27
>
rauh13:01:19

I can't use default methods in interfaces, right? Since Clojure promises Java 1.6 compat?

rauh14:01:37

Thx. I figured, I thought maybe the bytecode compiled by a 1.8 compiler would run under older JVMs as well... But I'm not too fluent in Java.

cfleming06:01:37

@U051SA920 By default, it won’t - the bytecode version is encoded in the class files, and javac defaults to assuming that the binary version of generated class files is the same as the source version used. You can use a 1.8 compiler to compile 1.6-compatible code, but it won’t let you use Java 1.8 level features.

cfleming06:01:03

Of course all that is a Javac thing - Clojure generates its own bytecode, so it can set the binary version it likes in the class files it generates.

rauh07:01:28

I didn't know that. Interesting!

rauh13:01:31

I'd like to add applyTo(Object x, ISeq seq) (and [x, y, seq], [x y z seq]) to IFn, so I'd need to create a new Interface to not break backward compat, right?