मुखपृष्ठ / विशेषताएँ
विशेषताएँ
मशीन आज क्या करती है और इसे क्यों बनाया गया।
यह अनुभाग अभी आपकी भाषा में अनूदित नहीं है और अंग्रेज़ी में दिखाया जा रहा है। अनुवादों का स्वागत है।
यह क्या करती है
Proper tail calls
A call in tail position reuses the current continuation frame instead of pushing one. Self-recursion and mutual recursion both loop in constant space.
An explicit CEK machine
Control, environment, and value are separate machine fields. Recursion in the evaluator is a tail call, so the V stack cannot overflow on a vlip loop.
Only #f is false
As in R5RS and Clojure: 0, the empty string, nil, and () are all true. Ruby and JavaScript say the opposite, which is why newcomers relearn this.
Core and derived forms
A small core that everything else desugars into, so each derived form gets tail calls for free instead of needing its own trampoline.
Bounded evaluation
Step and continuation-depth limits are fields on the machine, not constants, so a host can bound untrusted code.
No global state
One Machine value holds everything. Two can run side by side with no interference, which is what makes embedding and testing possible.
यह अनुभाग अभी आपकी भाषा में अनूदित नहीं है और अंग्रेज़ी में दिखाया जा रहा है। अनुवादों का स्वागत है।
स्पष्ट मशीन क्यों
A tree-walking evaluator written as a recursive function runs out of C stack before it runs out of vlip stack. Every non-tail vlip call becomes another V frame, so the host's limit becomes your limit.
Writing the evaluator as an explicit machine with its own heap stack moves that boundary somewhere you can see. The cost is a step counter and a dispatch loop. The benefit is that the numbers in the table below are measured rather than hoped for.
यह अनुभाग अभी आपकी भाषा में अनूदित नहीं है और अंग्रेज़ी में दिखाया जा रहा है। अनुवादों का स्वागत है।
मापा गया
| Test | Iterations | Result | Stack at end |
|---|---|---|---|
| self tail call | 250,000 | 250000 | 0 |
| mutual tail call | 20,000 | pong | 0 |
| tail call in cond | 100,000 | 100000 | 0 |
| tail call in let | 50,000 | 50000 | 0 |
| fib, non-tail | 20 | 6765 | 0 |
| loop, summing | 20,000 | 199990000 | 0 |
यह अनुभाग अभी आपकी भाषा में अनूदित नहीं है और अंग्रेज़ी में दिखाया जा रहा है। अनुवादों का स्वागत है।
अंतिम कॉलम पढ़ें
A stack depth of zero at the end is the whole claim. Without real tail calls that column would hold the iteration count instead. Every number here is produced by the test suite that CI runs, so none of them can drift away from the implementation unnoticed.