Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/pvorb/websafe
- Owner: pvorb
- Created: 2013-06-28T20:26:21.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-06-28T20:31:18.000Z (over 11 years ago)
- Last Synced: 2024-04-14T22:22:16.169Z (7 months ago)
- Size: 105 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 `=>` notationE.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.