sikanhe / reason-nodejs

Node bindings for Reason and Bucklescript
MIT License
100 stars 18 forks source link

Conventions on Style, Techniques, Naming, etc. #17

Open austindd opened 4 years ago

austindd commented 4 years ago

It's important for this library to be consistent across modules in things like naming conventions, binding optional parameters, handling options objects, using named arguments, etc.

We also use a couple of techniques globally that ought to be used everywhere they apply (in particular, Stream sub-typing, use of BinaryLike.t('a), etc).

With consistency and quality in mind, I am posting this set of guidelines to follow when we run into situations where multiple possible solutions exist. That way we can settle on exactly one of those solutions and stick to it.

Principles

Naming & Techniques


More will be added later. This is all open to discussion and critique, so feel free to offer any opinions or concerns in the comments. If we reach an agreement on something, I will edit this post to reflect any changes.