Nim IMHO is one of underrated languages. It is as efficient as C and as clean as Python. I just wish for some solid tooling and companies backing it. Without that it’s extremely hard to convince people to pick up something that will have good tooling in future.
This slightly modified version:
def fibTCO(n, a=0, b=1):
if n == 1:
return fibTCO(n - 1, b, a + b)
Py3 Computed fibTCO(47)=2971215073 in 0.00 seconds
Ah, the original implementation gives me:
Py3 Computed fib(47)=2971215073 in 552.15 seconds
That’s neat - I’ve never seen that version of Fibonacci before.
I love the idea of well made bridge code…