Functional Programming Anti-Patterns

Поделиться
HTML-код
  • Опубликовано: 1 дек 2024

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

  • @moonbiscuit8742
    @moonbiscuit8742 6 месяцев назад +2

    I'm working on a project which has banned throwing exceptions and abuses the Optional/Result pattern in a bad way. We're not even using it in a very functional way - there is no .Map() on it. Every method call is followed by the same mindless if() checking of the result and bubbling up the error to the top level - it's not that callers can even handle the optionality. Introduces a huge amount of useless code surface serving as distraction. Honestly don't understand why nobody questions this. I tried to bring it up, I get my favorite reply - "let's keep it consistent".

    • @i-am-the-slime
      @i-am-the-slime 6 месяцев назад

      Why don't you use a monad transformer?

  • @self-aware986
    @self-aware986 6 месяцев назад

    Interesting and entertaining talk!

  • @aoeu256
    @aoeu256 6 месяцев назад

    Pretty awesome, I wish we could upgrade code from one language to another when we figure out better ways of developing stuff. Julia also looks pretty awesome, its a LISP but with infix syntax. You can use Clojure in a Java project by telling people that S-expressions are XML 3.0, and sometimes you can try using a cross-compiler to change your clojure to Java if they get suspicious.
    Its awesome you talk about the Either problem (checked Exceptions) in Haskell, its a problem in Haskell with *ALL* containers including Maybe and all other Monads, however, Haskell is more consistant so I maybe there is a solution to it (Algebraic effects somewhat fix it), while Java lacks referential transparency everywhere so maybe that may change things.

  • @vturcan
    @vturcan 6 месяцев назад

    Thanks for ctrl+shift+i !

  • @bbravoo
    @bbravoo 6 месяцев назад

    Happy to see that Victor is stating to love Kotlin ♥

  • @i-am-the-slime
    @i-am-the-slime 6 месяцев назад +1

    referential is the word

  • @i-am-the-slime
    @i-am-the-slime 6 месяцев назад +1

    What a backwards way to look at this. Java is the weird one that requires an object everywhere instead of having functions like every other PL in the world. God Java is so bad.