Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 4
    Still highly relevant today. Bravo! Well said. Commented Jul 4, 2020 at 16:47
  • 4
    This is a great answer, I finally have some idea about what declarative programming is! @Tobia Commented Oct 20, 2020 at 20:00
  • 3
    so , in C++, std::sort(a.begin(),a.end()); can be said to be a declarative program? Commented Aug 4, 2021 at 12:21
  • 2
    This answers make it sound like declarative programming is either a property of a language or simply a style for writing computer programs. Some languages like SQL are designed to be declarative. But nothing should stop you from writing declarative code in so-called imperative languages like Java, etc. Commented Apr 29, 2023 at 13:12
  • 1
    If I use an imperative language, and I make sure all my functions depend only on the parameters I explictly pass them, and that they don't alter the value of any other variable outside of them... that's not considered functional programming? Commented Feb 22, 2024 at 20:38