This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-08-23
Channels
Hi folks, is it possible to come up with a macro, that somehow catches compile-time exceptions, like "Unable to resolve symbol"?
@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.
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?