Functional Programming Vs Declarative Programming Vs Imperative Programming

前端 未结 4 1424
隐瞒了意图╮
隐瞒了意图╮ 2020-12-07 16:38

I have been too used to Imperative Programming which is the usual way of telling the computer to perform step by step the procedure to get the final result. On the other han

4条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-07 17:29

    Another useful explanation I found in the Pro XAML with C#:

    On Declarative

    In declarative programming, the source code is written in a way that expresses the desired outcome of the code with little or no emphasis on the actual implementation.

    On Imperative

    Imperative programming is the opposite of declarative programming. If declarative programming can be thought of as declaring what the desired outcome is, imperative programming can be viewed as writing lines of code that represent the instructions of how to achieve the desired outcome.

提交回复
热议问题