Config: add alter and orElse to avoid the ++ madness (#6)
Everyone gets confused by the order of ++.
It's backwards from what people expect.
When you name your Configs 'WithX' it gets especially confusing.
People want to write: Base ++ WithX ++ WithY, but that's wrong!
They actually need: WithY ++ WithX ++ Base.
The API: x.alter {
case X => Y
}
... does work as people expect. Right-hand side wins.
Let's encourage people to write this:
Base alter WithX alter withY
Later we can deprecate '++' so people can write:
WithY orElse withX orElse Base
parent
3dcc62a4
Please register or sign in to comment