ballercat / walt

:zap: Walt is a JavaScript-like syntax for WebAssembly text format :zap:

Home Page:https://ballercat.github.io/walt/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Language Feature Document

ballercat opened this issue · comments

Goal

A user should be able to read through the features of a language.

Overview

Kind of hard to point others to specs etc., when trying to list out language features. Some of the early documentation is out of date on the wiki. We need an MD-file doc with all features clearly documented.

One thing of note is that, where possible, we can omit documentation for 1:1 JavaScript features. Like object access.

Acceptance Criteria

Think basic language doc, topics should be in the following order

  • Basic Types
  • Available Math operators
  • Control flow (list missing, switch)
  • Function declaration
  • Custom Function types
  • Exports, Imports
  • Walt custom types Table, Memory
  • Arrays and memory access
  • User-defined structs
  • Closures

Bonus points

  • Document what the syntax above is compiled to in WebAssembly opcodes!

One thing of note is that, where possible, we can omit documentation for 1:1 JavaScript features. Like object access.

I would argue that having a list telling us which features are 1:1 JavaScript is important, though

Fair point. I can see how someone new to the project/idea would find such documentation important. Can be tough to remember that there is a knowledge gap when you work on a project like this for so long :)

I know the feeling. And it's especially tricky since bridging that gap is exactly what documentation is for

ReasonML docs are great example IMO