News for hackers. Stuff that matters.
Re:The controller pattern is awful (and other OO heresy) by robocat on Monday July 10, 2023 @01:17PM (#36669503)
> oop languages encourage state, mutability, nulls, exceptions and god knows how many trivially preventable entire classes of errors. Granted, most have now started to come around and are adopting more fp features and ideas every year

Do functional languages actually discourage "state, mutability, nulls, exceptions"

I know why we might argue against these features, but implying that functional programming doesn't have those features seems a little weird (or equivalent e.g. call/cc can cause execution flow less predictable than exceptions)!

Re:The controller pattern is awful (and other OO heresy) by jacobr1 on Monday July 10, 2023 @01:23PM (#36669618)
My limited experience with FP languages suggests they encourage very explicit state management. You remove a lot of the footguns from having side-effects all over the place at the cost of the (sometimes, depending on the tooling and your familiarity with it) it being more complex to introduce state or external side-effects when you want them.
Re:The controller pattern is awful (and other OO heresy) by jononomo on Monday July 10, 2023 @02:06PM (#36670446)
Once I got the hang of Elixir/Erlang it was just such a weight off my shoulders, honestly. Programming without entire classes of bugs is so much nicer.