We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Declarative Thinking and Programming

Formal Metadata

Title
Declarative Thinking and Programming
Title of Series
Number of Parts
160
Author
License
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Declarative Thinking and Programming [EuroPython 2017 - Talk - 2017-07-13 - PyCharm Room] [Rimini, Italy] Declarative Programming is a programming paradigm that focuses on describing what should be computed in a problem domain without describing how it should be done. The talk starts by explaining differences between a declarative and imperative approach with the help of examples from everyday life. Having established a clear notion of declarative programming as well as pointed out some advantages, we transfer these concepts to programming in general. For example, the usage of control flow statements like loops over-determine the order of computation which impedes scalable execution as well as it often violates the single level of abstraction principle. Following the theoretical part of the talk, some practical examples are given how declarative programming can be applied easily within Python. This comprises the advantages and disadvantages of using a configuration file, e.g. config.yaml, versus a Python configuration module, e.g. setup.py. Furthermore, the benefits of avoiding statements of control flow with the help of list and dictionary comprehensions as well as sets are demonstrated. The talk is concluded by a short, high-level excursion to a logistic programming language, namely PyDatalog in order to build the bridge between logistic and declarative programming. This is accomplished by showing how a mathematical crossword can be easily solved with the help of declarative and logistic programming