Uploaded image for project: 'Marathon'
  1. Marathon
  2. MARATHON-7244

Update contributing.md to reflect our consensus on for comprehensions

    Details

    • Type: Task
    • Status: Accepted
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Docs
    • Labels:
      None

      Description

      At one point we loved them, and encouraged them over flatMap / flatMap / map chains.

      Now, we hate them. Apparently.

      But our contributing.md still says we love them.

      Let's get consensus and update contributing.md

      Positive (for comprehensions):

      • Some find them easier to read (the submitter of this ticket includes themselves in this category)
      • Nice way to avoid nested code.
      • They literally just desugar to flatMap / flatMap / map statements so there is no performance penalty for using them.

      Negatives:

      • Some find them more difficult to read
      • Can open up a performance pitfall. Without understanding for comprehension evaluation rules, you could evaluate an expression more times than needful. Feeds in to the prior point

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tharper Tim Harper
              Team:
              Orchestration Team
              Watchers:
              Tim Harper
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: