Skip to content

Documentation, Examples, and Readme's #1

Open

Description

@rattrayalex

This is a meta-issue for ease of organizing, while the project is in its early stages.

  • lightscript.org/docs is super slow
  • better now example in docs
  • explain homepage examples ("React Example; try editing for live-compilation")
  • come up with async + data-processing example for homepage
  • homepage has an unnecessary horizontal scrollbar
  • explain the ambiguities & deviations (eg; why can't you have both {blocks} and {objects})
  • interactive code walkthrough / tutorial
  • homepage examples actually execute
  • clean up babylon-lightscript readme

More specific:

  • document that single-line arrow functions which return objects need wrapping parens, as in ES6
  • if opts: { withDispatcher, isDispatcher } = opts - document that it needs to be on next line. (general case: (destructured) objects must start a line)

Activity

  1. jsonnull commented on Mar 6, 2017

    @jsonnull

    Hey @rattrayalex

    Regarding "better now example in docs"—I'll probably do a pass at reviewing the current reference docs as a whole.

    Along those lines: since there will be a separate, guided introduction to the language as a whole, there could be room to trim down the reference docs to be especially concise but still illustrative.

  2. rattrayalex commented on Mar 6, 2017

    @rattrayalex
    ContributorAuthor

    Cool – although in the case of now, I'm actually going to revise the language itself to guide users more directly instead (shadowing with implicit const shouldn't be allowed, it's too confusing and too likely to result in accidents).

  3. jsonnull commented on Mar 7, 2017

    @jsonnull

    Hmm how's that going to work?

  4. rattrayalex commented on Mar 7, 2017

    @rattrayalex
    ContributorAuthor
    let someVar
    if someCond:
      someVar = 1
    // SyntaxError: `someVar` is shadowed from a higher scope. If you want to reassign the variable, use `now someVar = ...`. If you want to declare a new shadowed `const` variable, you must use `const someVar = ...` explicitly. 
    

    Something like that 😉 let's move discussion to Gitter? Just created an org: https://gitter.im/lightscript/Lobby

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions