People say that the clojure implementation is excellent, except for limiting the lack of tail call optimization - limiting the jvm implementation, not the clojure.
http://lambda-the-ultimate.org/node/2547
It was said that for the implementation of TCO in Python donates
Explain to me what a big problem with tail call optimization is and why Python needs it
Have the same sacrifices been made to implement TCO in jvm? Will anything else be sacrificed?
( , il ), .Net 64- JIT .
, , :
, , , , , .
, JVM .
, , , JIT , , , Debug. , , . "" .
, , , / ( , ), / ., , , , .
JVM. wiki page .
, . , TCO , .
It is also interesting to note that Clojure has a "recur" function that does not require a stack to circumvent this limitation for current versions of the JVM.
Example:
(defn triangle [n accumulator] (if (<= n 0) accumulator (recur (dec n) (+ n accumulator)))) (triangle 1000000 0) => 500000500000 (note stack does not explode here!)
Source: https://habr.com/ru/post/1710671/More articles:Is there an equivalent to $ (document) .ready for initialization after reloading part of the page? - jqueryCustom Generic.IEqualityComparer (Of T) - Compiler Errors - vb.netConvert HTML to JSF - htmlWhat is the best way to get around a "potentially dangerous request" error in asp.net? - htmlВ чем смысл потенциально опасного значения Request.Form было обнаружено из сообщения об ошибке клиента - c#How to make the dock icon stop icon after running the shell application script? - shellOLE Compound Documents in Python - pythonDrag html table in PowerPoint 2007 - interopSeparating the web server and application server, are they needed as java? - javaIs xs: selection the equivalent of a C ++ enumeration? - xmlAll Articles