material-motion / material-motion-js

Reusable gestural interactions in JavaScript. In development.
Apache License 2.0
290 stars 26 forks source link

Rename operator interfaces #216

Open appsforartists opened 7 years ago

appsforartists commented 7 years ago

At some point, we had a convention that interfaces should end with able; hence, all the operator interfaces, e.g. MotionMemorable. That convention hasn't really held true - both MotionObservable and the interactions are examples of concrete classes that end in able.

Thus, we should clean up the interfaces to better distinguish them. The winning proposal so far is to capitalize the operator name, e.g.:

withPluck(): S & Pluck {
  return class extends superclass implements Pluck {
    pluck() // ...

withRemember(): S & _Remember {
  return class extends superclass implements _Remember {
    _remember() // ...
appsforartists commented 6 years ago

Another option is to rename the interactions to avoid the able suffix. That should probably happen too, since most compound interactions won't lend themselves easily to "$VERBable" names.