Fork me on GitHub
#clojure
<
2020-08-23
>
vdmit1108:08:25

Hi folks, is it possible to come up with a macro, that somehow catches compile-time exceptions, like "Unable to resolve symbol"?

cch116:08:19

@vdmit11 In general that is not possible since the macro is not in scope once the expansion has finished. But I imagine you could write a macro that catches exceptions in its own expansion code.

cch116:08:45

I want a Clojure deftype that is backed by a (Java native) byte-array and supports round-trip via data_readers.clj. I’m starting to think this is impossible since the reader seems to want to create an intermediate representation of the deftype (that cannot be controlled with print-method/print-dup) and of course the byte array is not a value type. Any suggestions?