Changes between Version 48 and Version 49 of Coding_Conventions


Ignore:
Timestamp:
Apr 10, 2020, 7:14:29 PM (4 years ago)
Author:
Freagarach
Comment:

Add JS-class information.

Legend:

Unmodified
Added
Removed
Modified
  • Coding_Conventions

    v48 v49  
    348348 * Use roughly the same Doxygen-style comments for documentation as described above for C++. (But we don't actually run Doxygen on the JS code, so there's no need to make the comments use technically correct Doxygen syntax.)
    349349
     350 * We've recently been switching to Class syntax for JS (see e.g. [https://code.wildfiregames.com/P169]).
     351   * Literals are stored in the prototype (e.g. `BuildingAI.prototype.MAX_PREFERENCE_BONUS = 2;`).
     352   * The Schema is also a literal and hence is stored in the prototype.
     353   * We don't want to rewrite components just for the sake of it, but new components should be written in the class syntax and major rewrites can opt to use the class syntax.
     354
    350355 * Don't omit the optional semicolons after statements.
    351356