a) What are the equivalents of this type of optimization in procedural languages that do not use it? b) To use these equivalents means that we avoid creating a stack in similar situations in languages that do not have it?
Well, the meaning of the tail call is that it can evaluate another function without adding calls to the stack, so anything that creates the stack cannot really be called equivalent.
A tail call behaves essentially like a transition to a new code, using the attributes of the function call language and all the necessary details management. Therefore, in languages without this optimization, you will use the leap within one function. Loops, conditional blocks, or even arbitrary goto
if nothing works.
a) where can I find more information about what is offered in the 2nd armor and what to do with it
The second bullet sounds like a simplification. There are many ways to make parallelization more complex than necessary, and overuse of the mutation is just one.
However, note that parallelization (dividing a task into parts that can be performed at the same time) is not quite the same as concurrency (with simultaneously performing several tasks that can interact), although they certainly overlap. Avoiding a mutation is incredibly useful when writing parallel programs, since constant data avoids many race conditions and resource competition that would otherwise be possible.
b) What patterns will emerge from the “mostly functional programming” style, and not the more careless style that I would probably continue with these other languages instead of taking this course?
Have you looked at Haskell or Clojure? Both are very prone to a very functional style, emphasizing a controlled mutation. Haskell is more rigorous in this regard, but has many tools for working with limited forms of volatility, and Clojure is a bit more informal and may be more familiar to you, as it is another dialect of Lisp.
CA McCann
source share