Skip to content

Exercise review comments #6

@noelmarkham

Description

@noelmarkham

As discussed, my comments from these exercises. I think they're really good.

Properties

  • The sqrt function returns Double, not Int, even though (for example) 9.0 == 9. But the property provided does not work for negative numbers. While I understand this is only an example, and thus it doesn't matter if the property holds or not, I would suggest it would be clearer if the property holds, and is unambiguous.
  • I think the explanation of implication could be better.
  • The implication example ((n == 0) ==> (n == 0)) is a bit confusing. I think it would be better if the implication was different to the property.
  • In Combining Properties, have both forAlls at the same indent level, as I thought these were nested.
  • I think the Grouping Properties section is confusing because the ZeroSpecification class takes a parameter, which (I think) is only ever 0. I think it would just be clearer if the value parameter is removed and simply replaced with 0.

Generators

  • Be consistent with { and ( on the check methods.

I can't think of any headline items to add, perhaps you may want to show a property that actually fails, and perhaps how to label properties and generators.

I've not done a language review on this either, please let me know if you want me to do that.

I'll leave these suggestions to you, but I'm happy to help if you need it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions