Unverified Commit d5d6839e authored by Wesley W. Terpstra's avatar Wesley W. Terpstra Committed by GitHub
Browse files

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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment