The importance of being declarative

Research output: Contribution to journalArticleScientific

1 Citation (Scopus)

Abstract

A declarative programming style focuses on what you want your program to do rather than how to perform the task. By avoiding implementation details, well-written declarative code is easier to understand, modify, and maintain. The code you write in a declarative style is often so readable that you can share it with your project's domain experts. Furthermore, once you start working with declarative code, you can automatically process it to verify properties of its operation, generate test cases, or create parts of the system's documentation. Small choices, such as the naming of your methods and variables, matter. If you're coding an algorithm, have your code match the algorithm's published description. Other approaches to consider include table-driven programming, the implementation of a domain-specific language, or the use of task-specific libraries. When you have the choice, pick the highest level language you can afford and that's suitable for the task at hand. The Web extra at http://youtu.be/s4oWie6laq4 is an audio podcast of author Diomidis Spinellis discussing why well-written declarative code is easier to understand, modify, and maintain.

Original languageEnglish
Article number6401117
Pages (from-to)90-91
Number of pages2
JournalIEEE Software
Volume30
Issue number1
DOIs
Publication statusPublished - 2013
Externally publishedYes

Keywords

  • abstraction
  • benefits
  • declarative programming
  • techniques

Fingerprint Dive into the research topics of 'The importance of being declarative'. Together they form a unique fingerprint.

Cite this