Skip to content

Naming Conventions

jbracker edited this page Mar 12, 2013 · 4 revisions

Whan writing function in Sunroof the following naming conventions should comply:

  • No Prefix/Suffix: General combinators and API methods that return a JS t a do not get a suffix or prefix.

    Examples: apply, function, new;

  • Suffix JS: Everything that takes a JS t a as argument has the suffix JS.

    Examples: forkJS, sunroofCompileJS;

  • Prefix JS: Types that directly represent Javascript values (generaly all that implement Sunroof) should have JS as prefix.

    Examples: JSBool, JSString, JSDate;

  • Prefix Sunroof: Classes that are tightly connected with Sunroof should have the prefix Sunroof.

    Examples: SunroofArgument, SunroofThread;

Clone this wiki locally