What is the difference between declarative and procedural programming paradigms?

后端 未结 8 661
旧巷少年郎
旧巷少年郎 2020-12-07 08:00

What is the difference between the declarative and procedural programming paradigms? Could you please provide some examples?

What other programming

相关标签:
8条回答
  • 2020-12-07 08:43

    Declarative programming is where you say what you want without having to say how to do it. With procedural programming, you have to specify exact steps to get the result.

    For example, SQL is more declarative than procedural, because the queries don't specify steps to produce the result.

    0 讨论(0)
  • 2020-12-07 08:44

    The main difference between two programming languages are, In procedural programming, we tell the computer how to solve the problem and in declarative programming, we tell the computer what problem we want solved.

    0 讨论(0)
提交回复
热议问题