Hacker News new | past | comments | ask | show | jobs | submit login

Exactly. Take as an example something from a side project of mine that I recently did:

https://blueprintue.com/blueprint/jt69wz7e/

Compare that with this bit of pseudocode:

  function inputAxisHandleTeleportRotation(x, y, actingController, otherController) {
    if(actingController.isTeleporterActive) {
      // Deactivate teleporter on axis release, minding controller deadzone around 0
      if(taxicabDistance2D_(x, y, 0, 0) < thumbstickReleaseDeadzone) {
        sendEvent(new inputTeleportDeactivate(actingController, otherController);
      }
      else {
        actingController.teleportRotation = getRotationFromInput(x, y, actingController);
      }
    }
  }  
Which one is more readable for someone who's even a little bit experienced in programming? Which one is faster to create and edit?



That nested if statement, in particular, looks especially awkward in the blueprint.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: