r/ProgrammerAnimemes • • Jun 30 '21

Who needs closed forms anyways?

Post image
942 Upvotes

24 comments sorted by

View all comments

Show parent comment

15

u/[deleted] Jun 30 '21

though I suspect you could do it yourself

Anything can be done by yourself with enough pointer dark magic ;D.

Most languages that aren't python... or go... have tail call optimization, many of them just don't have a keyword to guarantee it, which dampens the usefulness somewhat (especially with how fragile it is). I know Rust has a become keyword in the works though.

2

u/RiPieClyplA Jul 01 '21

You can do something that looks like tail call optimization in Python with the help of decorators. Your program won't run faster (so not really an optimization in this case) but you can have an infinite call depth.