Skip to content

Instantly share code, notes, and snippets.

@Olical
Created January 28, 2015 13:42
Show Gist options
  • Select an option

  • Save Olical/1d11901f1b7efa959366 to your computer and use it in GitHub Desktop.

Select an option

Save Olical/1d11901f1b7efa959366 to your computer and use it in GitHub Desktop.
function SomeThing {
var sortOfPrivateThroughClosure = true;
this.someVal = {};
this.doThing = function () {
// ...
};
// Then sometimes the values are ES5 getter/setter methods with side effects.
// The only way to tell is to read the source of the object you're dealing with though.
// I tend to avoid _ prefixes since I see people ignore that and use them anyway.
// Can't remember the Python convention now, but pretty sure that way all public or prefix with _.
// Although Python takes the "concenting adults" route. Strage that I trust people writing Python more than I do JavaScript...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment