all 16 comments

sorted by: hot top controversial new old
[–] 33 points 2 years ago (7 children)

Fortunately you're likely to run out of memory or swap space and it will stop all by itself 😇

  • source
  • hideshow 7 child comments
  • [–] 20 points 2 years ago (6 children)

    tail call optimization wants to know your location

  • source
  • parent
  • hideshow 6 child comments
  • [–] 12 points 2 years ago (5 children)

    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

  • source
  • parent
  • hideshow 5 child comments
  • [–] 5 points 2 years ago (2 children)

    Functional programming would have quite the problem if it wasn't a thing.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 4 points 2 years ago (1 child)

    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.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 3 points 2 years ago

    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.

  • source
  • parent
  • [–] 9 points 2 years ago

    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.

  • source
  • [–] 5 points 2 years ago

    until your stack runs out of memory

  • source
  • [–] 3 points 2 years ago (4 children)

    I had this problem only once. Luckily, I do not need recursion. I know my way using iterative process.

  • source
  • hideshow 4 child comments
  • [–] 1 point 2 years ago (3 children)
  • [–] 2 points 2 years ago (2 children)

    I actually use repeat(iterations,index_name(optionall),);. No need for i++ or ++i for loop in many cases.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 2 years ago

    He's not making the function call past n-1

  • source