App-Spec-p5 icon indicating copy to clipboard operation
App-Spec-p5 copied to clipboard

proposed changes to use more of Moo, second attempt

Open dakkar opened this issue 7 years ago • 1 comments

(This PR contains the same changes as #15, but organised in a way that should make it much easier to review)

In reference to #14 :

  • type constraints everywhere: among other things, this makes clearer what each attribute can accept
  • defaults for all attributes where it makes sense
  • BUILDARGS/new instead of common/build, this makes classes easier to use and extend
  • op now canonically accepts a coderef (previously it did, but probably by mistake: it's a useful feature, let's support it properly)

Maybe needed before merging:

  • documentation for all the type constraints
  • better names for them

Possible future work:

  • review the various enums
  • review the various union types, and check if they really make sense
  • reduce the number of rw attributes

dakkar avatar Dec 26 '17 16:12 dakkar

I suggest looking at one commit at a time, in order: I've tried to keep them self-contained (tests always pass, for example) and focused (one file, or one class of type constraints per commit, for example).

dakkar avatar Dec 26 '17 16:12 dakkar