OO or FP easier for beginners

It’s handled quite well. You can specify only 2-3 fields of a struct and let the remaining 30+ be defaults:

Much beyond that: interactions between options and how the defaults play into it. As mentioned in this (or other? can’t remember now) thread I had the misfortune of working with libraries and other people’s code where a library silently reverts config to defaults because you didn’t specify something well enough for it.

NimbleOptions is fantastic and I wish every library that needs config used it. That being said, I already addressed this when I said the following:

And yes I agree we hardly need static types in Elixir because of pattern-matching and guards. But there are blind spots in the community and I find myself wishing for stronger checks there (again, library configurations).

That’s kind of moving the goalposts maybe, but I agree with your premise.

Finally, that’s a bit of a weird thing to say, refactoring is 100% inevitable. Hope you are not making the argument that we have to dream up 100% of the app before we hear the 50+ “I changed my mind” complaints from customers.

1 Like