Parallelism: Concurrency made simple

⚠️ All relevant documentation is built into the source code, generate docs with dartdoc for ? comprehensive documentation. Or, view documentation on Github or Pub.dev

dart doc --output docs

Misc Coding Conventions

Documentation

  1. All documentation goes in the dart documentation comments.

  2. Library level documentation must provide an overview explanation of how it's constituent classes/methods work. All of them. This is primarily aimed at future developers, not package users.

    Also note the following in Library level documentation:

    • Necessary background knowledge (explanation or links.)

    • Design Rationale behind major design choices.

    • Naming Conventions, so consistency is maintained over all modifications.

    • Comparative outlines of similar classes with different purposes/performance considerations.

    • Other Misc Technical details of note.

  3. Class documentation should include a usage example. Keep the example under 10 lines.

  4. Documentation for all public interfaces. Use this format:

    One line description of what the method/class/thing does
       
    <!-- Add only if the arguments aren't self-descriptive -->
    <!-- Add for all generics -->
    | Args / Generics | Description  |
    | --------------- | ------------ |
    | `argumentName`  | What it does |
     
    ### Exceptions <!-- Add this section if there are uncaught Exceptions/Errors -->
    - `ExceptionName`: Cause(s) for this exception.
     
    ### Note <!-- Add this section where you want to highlight something specific -->
    - Bullet point everything except the one line description.
     
    - You can highlight anything from the a quirk of the internal logic of this function to a random
    fact related to this function
    

Variable Naming

  1. Don't ignore return values even if you are not using them, use dummy variables (_, __, basically any number of underscores) to handle them

Library Structuring

  1. Keep file sizes small. Break up large 'design chunks' (eg. color) into smaller mini-libraries (eg. color utils, color palette generation, color theme generation).

  2. Mini-libraries are to be collected into a single library (eg. color.dart) using the export/show directives.

Libraries

parallelize
Run Code in parallel without having to worry about low-level Isolate details.