Architectural layers and abstraction impedes imperative readability, since both hide the concrete implementation details.

  • Paragone
    link
    fedilink
    arrow-up
    1
    ·
    7 months ago

    from the article…

    "Imperative Readability

    < snip >

    How does the function execute its logic?

    What are the specific steps taken by the code?

    Which operations are performed in what sequence?

    How are state changes managed and tracked

    < snip >

    Declarative Readability

    On the other hand, declarative readability (or readability-d) uses abstractions and architectural layers to manage complexity. It seeks to answer very different types of questions:

    What is the intent of this function or module?

    What business rule or domain concept is this code encapsulating?

    What is the end goal or output of this code, in terms of the domain?

    What are the high-level policies or constraints that this code is adhering to?


    … I’ve no interest in learning Scala or Closure, but damn that is an important differentiation…