C++ /Powershell / Java / Groovy / Python
Declarative programming – is a programming paradigm that focuses on what to execute, defines program logic, but not detailed control flow. What to do?
SQL/Prolog/
Python Example
# Declarative
small_nums = [x for x in range(20) if x < 5]
# Imperative
small_nums = []
for i in range(20):
if i < 5:
small_nums.append(i)
Комментариев нет:
Отправить комментарий