What is the difference between declarative and procedural programming paradigms?

后端 未结 8 684
旧巷少年郎
旧巷少年郎 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.

提交回复
热议问题