top | item 30864374

(no title)

s3micolon0 | 3 years ago

I believe, by "Design everything you can to be declarative" runjake is talking about is above creating good abstractions that satisfy a particular use case, abstracting the user from the implementation details.

Wikipedia defines Declaration programming as "In computer science, declarative programming is a programming paradigm—a style of building the structure and elements of computer programs—that expresses the logic of a computation without describing its control flow." [1]

By decoupling a user from the low level imperative understanding of the system and focusing on the high level abstractions, if the interface is well designed, it enables the user to think at a higher level of abstraction and expands their boundaries in expressing what they want to achieve using the higher level constructs.

One of the most famous declarative interface is "React.JS" which allows to think at the level of the "components" [2], while in acuity, it's abstracting the DOM from the user as a virtual DOM [3] level and performing reconciliation[4] internally for rendering to the actual DOM. But, as an end use, they don't really have to think about these implementation details and can just work with the "components" abstraction.

Most user interfaces I have seen are abstracted in a declarative / markup language. The most famous declarative interface is SQL.

In relation, I would also recommend reading this wonderful article about leaky abstractions by Joel Spolsky to understand the flipside of abstractions, in general: https://www.joelonsoftware.com/2002/11/11/the-law-of-leaky-a...

--

1: https://en.wikipedia.org/wiki/Declarative_programming

2: https://reactjs.org/docs/components-and-props.html

3: https://reactjs.org/docs/faq-internals.html

4: https://reactjs.org/docs/reconciliation.html

discuss

order

No comments yet.