summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-01-18 19:49:09 -0500
committerRyan Dahl <ry@tinyclouds.org>2019-01-24 13:33:51 -0500
commit441bc0982b1ff9c363a1e767d0a9ef7a35e6518c (patch)
tree42b739a293e0013bb13e7c966e709fd05e09801a
parent306a5f701ee9fa3acfe62f6957bb4d35a09689ec (diff)
Style guide: metaprogramming, private filenames
Original: https://github.com/denoland/deno_std/commit/e87cd44033e1ccce17d57c07e674ee573009633a
-rw-r--r--README.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/README.md b/README.md
index f0f3a90fc..03bcae0fa 100644
--- a/README.md
+++ b/README.md
@@ -118,6 +118,19 @@ export function foo(): string {
}
```
+### Meta-programming is discouraged. Including the use of Proxy.
+
+Be explicit even when it means more code.
+
+There are some situations where it may make sense to use such techniques, but in
+the vast majority of cases it does not.
+
+### If a filename starts with underscore, do not link to it: `_foo.ts`
+
+Sometimes there maybe situations where an internal module is necessary but its
+API is not meant to be stable or linked to. In this case prefix it with an
+underscore. By convention, only files in its own directory should import it.
+
### When referencing Deno online, use the #denoland tag.
The name "deno" unfortunately is not especially unique on the internet. In order