Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Tuna-Fish
on Nov 22, 2016
|
parent
|
context
|
favorite
| on:
Sccache, Mozilla’s distributed compiler cache, now...
I started liking this convention when I started considering the tests documentation. In my code, the first unit test for any function is always the simple common case, and having that right next to the function usually makes the code easier to read.
steveklabnik
on Nov 22, 2016
[–]
You should move it to a documentation block, given that doc examples are also run as tests. Then your users can see them too. Win-win!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: