9 Matching Annotations
  1. Oct 2020
    1. Declarative programming is an enabler of abstraction. Imperative programming is an inhibitor of abstraction. Declarative programming allows you to say “I want this and I don’t care how I get it” while imperative programming requires you to define each and every step.

      Declarative programming, i.e. "build me a house, I don't care how", is an enabler of abstraction.

      Imperative programming, i.e. "build walls, windows, a roof.", is an inhibitor of abstraction.

    1. SwiftUI is a user interface toolkit that lets us design apps in a declarative way. That’s a fancy way of saying that we tell SwiftUI how we want our UI to look and work, and it figures out how to make that happen as the user interacts with it.
    2. Imperative UI causes all sorts of problems, most of which revolve around state, which is another fancy term meaning “values we store in our code”. We need to track what state our code is in, and make sure our user interface correctly reflects that state.
    1. This is exactly what we need the vDOM for — we might not need it for reactive state updates, conditional rendering or list rendering, but as long as we have it we can treat our component hierarchy as fully dynamic and controllable object. You cannot code a serious fully declarative app without this feature.
    1. I really missed my data being declarative. By that I mean with Knockout I'd describe a thing and all its behavior in one code block and then I could encapsulate it. React HOCs weren't quite the same. The declarations and the behavior were still separate generally.
  2. Sep 2020
    1. detach, as an api, should be declarative (ensure the node is detached) instead of imperative (detach the node), allowing it to be called multiple times by performing a noop if the node is already detached. This way, it won't matter if the node is removed from the DOM from outside of svelte.
  3. Jan 2016
    1. Ecocide

      Interesting idea. The only thing is that the science is not where we would like it to be. Most of the accusing will need to be done in retrospect. In that case, many will have lost culpability due to insufficient knowledge. I just wonder how this will hold up in a court of law for most practical cases. For some large-scale cases, I can see it working, as long as the effects are enormous.