Fortunately you're likely to run out of memory or swap space and it will stop all by itself ๐
Programmer Humor
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
tail call optimization wants to know your location
I've been writing software for over 40 years and this is the first I have ever heard of this. Much appreciated.
I'm still trying to grok it, but for anyone playing, here's where I started:
https://stackoverflow.com/questions/310974/what-is-tail-call-optimization#310980
i am glad my shitposting was educational
though tbh you're unlikely to ever need this knowledge unless you're heavily into functional programming or golfing or coding interviews or other esoteric arts
๐
Functional programming would have quite the problem if it wasn't a thing.
It's funny. When I first started, functional programming was going to be the next big thing. It bubbled along for a decade or so. I interviewed company founders about their functional software projects.
Nothing happened.
Sure there are a few, let's call them niche, applications, but you just have to look around and see that object orientation made a bigger splash and even that is beginning to be evaluated.
Perhaps functional software will have its day in the limelight, but with the latest AI slop fad, it's going to be a while.
The of the ideas of functional programming have gone on to influence the field.
Algebraic data types and monads are used heavily in Swift/Rust/Scala/Typescript.
Concepts like left/right associativity and pure functions are critical to the entire MapReduce paradigm of computing. Apache Spark, pandas, and the entire dataframe programming paradigm is basically functional programming (though most people suck at pandas and treat it like an object oriented tool).
I think a lot of React is also heavily inspired by functional programming, and modern concurrency schemes are inspired by functional programming.
F# and Haskell didn't win the language wars. I've worked on one erlang project and it was neat, but I think you're right, I mostly see MVC apps.
Could be worse. I once experimented with a debug-level function that ran on every line of text printed to the console. And had a typo, which threw an error. Which printed to the console.
until your stack runs out of memory
I had this problem only once. Luckily, I do not need recursion. I know my way using iterative process.
You forgot i++
I actually use repeat(iterations,index_name(optionall),);
. No need for i++ or ++i for loop in many cases.
He's not making the function call past n-1