Skip to content

Instantly share code, notes, and snippets.

@barneycarroll
Created December 1, 2017 10:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barneycarroll/978ac347a658f92bb31a6fdb9e4b820f to your computer and use it in GitHub Desktop.
Save barneycarroll/978ac347a658f92bb31a6fdb9e4b820f to your computer and use it in GitHub Desktop.
  • For something to merit a name, it must be used in at least 2 places.
  • Favour operations, avoid keywords.
  • Some punctuation is semantically essential (||, ?, !), some is only arguably useful sometimes ({, ;). Favour the first, avoid the second when you can.
  • ☝️ Parentheses are the exception. ( is brilliant, so is ,. Use them eagerly!
@barneycarroll
Copy link
Author

barneycarroll commented Dec 4, 2017

Ideas for a theme to encourage good practices in this area:

  • Prioritise operator and scoped reference prominence
  • Diminish keyword & parenthesis prominence

Distinguish between imports, signature & declaration references

Maybe a scale of reference colour saturation mapping to scope, ie

a(b => b(({c}) => c)
|

☝️ a, b, and c are increasingly less colourful

a(b => b|(({c}) => c)

☝️ b, is most colourful (b & c are equally less colourful?) (c is discoloured because it's out of scope?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment