guard clauses

Поделиться
HTML-код
  • Опубликовано: 28 авг 2024
  • my products:
    typefast.gumro...
    work with me:
    www.typefast.c...

Комментарии • 4

  • @ledockol
    @ledockol 5 месяцев назад +2

    Chris, you've correctly explained the operation of guard clauses. However, the example provided in the video is clearly not well-chosen.
    There's no point in adding such a check and returning false. It's simpler to just check
    def negative?(value)
    value < 0
    end

  • @Ali_Hassan_jatt
    @Ali_Hassan_jatt 5 месяцев назад +1

    Bro where you from

  • @qdbp1717
    @qdbp1717 5 месяцев назад +3

    Sorry, but I think this video doesn’t explain guard clauses good to understand their purpose. Just come with some nested if statements that check for eg. min len 3, first char uppercase …., and then show how this case would be with guard clauses

    • @typefastco
      @typefastco  5 месяцев назад

      Only got 60 seconds 😅