News for hackers. Stuff that matters.
Re:You might not need if statements: a better approach to br... by shaftway on Monday January 23, 2017 @01:58AM (#13460388)
I like how the author just re-invented if statements. Even still called them "if". Compare:

  [snip] {
    title: 'Has the user searched yet?',
    test: !!pageData.searchKeyword,
    if: {
      true: {
        [snip]
      },
      false: {
        [snip]
      },
    },
  }, [snip]
vs.

  // Has the user searched yet?
  [snip] if (decisionData.searchKeyword) {
    [snip]
  } else {
    [snip]
  }
I expected something like a state machine, instead of OOJSON.

There are no comments on this comment yet.