jeffh / Fox

Property Based Testing Library for Objective-C and Swift. QuickCheck for Apple's Platforms.
http://fox-testing.rtfd.org
Other
624 stars 30 forks source link

FOXPropertyResult: Add documentation and retain properties #12

Closed modocache closed 9 years ago

modocache commented 9 years ago

See individual commit messages for details.

modocache commented 9 years ago

With regards to the second commit, which retains properties: it seems like a lot of Fox code omits atomicity and setter semantics on properties, which results in using the defaults. But it seems like, in many cases, this leads to "incorrect" semantics--like using assign for objects that should be retained.

Anyway, might be something to watch out for.

jeffh commented 9 years ago

@modocache, I thought that assign was always the default semantics for awhile, but see "Transitioning to ARC Release Notes":

Under ARC, strong is the default for object types.

If you can point out specific cases where the compiler/runtime do not honor that, I'd love to be wrong.

modocache commented 9 years ago

Wow, learn something every day! I had no idea. I would argue that writing out the setter semantics is clearer, but it's certainly a matter of preference.

Would you prefer I remove c08d017 from this pull request, leaving just the documentation additions?

jeffh commented 9 years ago

In the past I did prefer being explicit, but I've only recently changed my mind about that. Removing it makes weak attributes standout when they're used. But yes, it's all a matter of preference.

I prefer if you remove it for this project. Thanks. :+1:

modocache commented 9 years ago

@jeffh Presto change-o, the commit is gone!

jeffh commented 9 years ago

Thanks! Such a fitting gif :)