Ad
  • Custom User Avatar

    In most of imperative languages like Java recursion works slower than iteration because lot call stack entries must be created and than you'll have to run through the call stack to collect your calculations results. that could be quite expensive.

    Functional languages are languages like Haskell, Scala, Erlang, Closure, etc. The difference is that in imperative languages your programm is some number of states that change each other, and in functional languages you have no state but only a number functions. The word 'function' should be understood in the way we understand it in maths. Function in functional language is just a relation betwenn inputs and results, and it's result depends only on input, but not any environment conditions. In imperative languges function can return you different result in different moment of time, depending on some external conditions like configs, database, etc. In purely functinal languages function will allways return you the same result as long as you give it the same input.

    Actually, the best way to understand what functional languges really are is to try them. Elm is a brilliant choice as your first functional language :)