documentcloud/backbone — pull request #1150 by tomasztunik (2012-03-28 22:47:31+00:00)
Title: Fix proposal for Model and Collection initializers 

It would be more convenient if options for the Model and Collection initializers were never empty so we can avoid doing checks for if they are set at all but rather be able to check for presence of any options that we might or might not expect

Also believe that it would probably have higher value if rather then passing undefiend if attributes weren't set it would pass the current state of attributes on initialization including anything that would be set by extending the attributes object with defaults or an empty object.

The question is - is the default value for attributes, and options undefined or rather empty object? I caught myself often putting default value of empty object (especially with coffee script and it's default value for attribute syntax) - I think it would be convenient if setting the default as empty object or current state would work out of the box.

(Includes tests)