Clojure ^浮动与#^浮动? [英] Clojure ^floats vs. #^floats?
本文介绍了Clojure ^浮动与#^浮动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Clojure类型注释中 ^ float'
和#^ floats
之间有什么区别?
What is the difference between ^floats
and #^floats
in Clojure type annotations?
在pull请求中,有人建议我使用这个注释:
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)
有什么区别吗?
推荐答案
#^ floats
是一种旧式语法,优先使用较新的Clojure版本 ^ floats
。
#^floats
is a legacy syntax, with newer Clojure versions ^floats
is preferred.
这篇关于Clojure ^浮动与#^浮动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文