atom/scoped-property-store — pull request #8 by maxbrunsfeld (2014-12-15 18:25:54+00:00)
Title: Group property sets into mutable layers

This is being driven out by atom/atom#4567 - improving the public interface of the atom `Config` object.

#### Context

Currently in Atom, the user's settings are not stored in the `ScopedPropertyStore`; they're stored in a separate mutable object. We want to move to storing *all* of the settings in the scoped store.

#### Problem

With the way the `ScopedPropertyStore` currently works, every change to a setting (e.g. increasing/decreasing the editor font size) would require *adding* a new entry to the cascade via `::addProperties`. This would increase the size of the object and slow down property value calculations over time.

#### Solution

I've reorganized the API of the `ScopedPropertyStore` so that it's based on mutable `Layers`. When you specifically want to add a new Layer, you add one via `::addLayer(name, {priority})`. When you want to *change* the value of a setting in a given layer, you use `Layer::set(selector, keyPath, value)`.

Layers are kind of like what were previously called `sources` - the user can use them to manage properties associated with a particular file. I think the word 'Layer' better tells the story that these objects represent entries in an ordered cascade.