Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pvorb/websafe

typesafe language for the web
https://github.com/pvorb/websafe

Last synced: about 1 month ago
JSON representation

typesafe language for the web

Awesome Lists containing this project

README

        

websafe
=======

Ideas for a typesafe Compile-to-JavaScript language:

* `val` for constant values (maybe `const`?)
* Type annotations with suffix `: T` notation (typesafety will be added later)

E.g.: `val a: Number = 0.0;`
* Function definition with `fn` keyword instead of `function` (maybe `def`?)
* Anonymous function definition with `=>` notation

E.g.: `(a, b) => { return a * b; }`
* Error on using undefined variables
* Error on defining variables without modifier
* `==` will always become `===`
* `if (a == ???) // ...` will translate to
`if (typeof a === 'undefined') // ...`

But in general: **keep it simple!** JavaScript doesn't have to change that much
to become much simpler.