What is the difference between ^floats
and #^floats
in Clojure type annotations?
In a pull request, someone suggested I use this annotation:
(.put #^floats init-fft-array)
which did the trick, but I don't know why the '#' is there. I found this worked, too:
(.put ^floats init-fft-array)
Is there any difference?
#^floats
is a legacy syntax, with newer Clojure versions ^floats
is preferred.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With