Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kevinsuttle/es-functional-mode-proposal
Proposal to enable opting JS into operating as a functional language
https://github.com/kevinsuttle/es-functional-mode-proposal
functional-languages javascript proposal tc39
Last synced: 5 days ago
JSON representation
Proposal to enable opting JS into operating as a functional language
- Host: GitHub
- URL: https://github.com/kevinsuttle/es-functional-mode-proposal
- Owner: kevinSuttle
- Created: 2016-09-19T17:03:09.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-09-23T04:07:38.000Z (about 8 years ago)
- Last Synced: 2024-10-30T00:38:09.150Z (about 2 months ago)
- Topics: functional-languages, javascript, proposal, tc39
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# es-functional-mode-proposal
Proposal to enable opting JS into operating as a functional languageSee ['use strict'](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode) for an idea of where this is heading.
Helpful plugin to simulate
https://github.com/bodil/eslint-config-cleanjs## Major points
### Strong-typing
TypeScript, Flow, Elm, and others agree that strong-typing provides safety and predictability.- https://github.com/flowtype/flow-typed
- https://github.com/DefinitelyTyped/DefinitelyTyped/
- http://elm-lang.org### Immutable data structures
- TypeScript 2.0 has a [readonly modifier](https://blogs.msdn.microsoft.com/typescript/2016/09/22/announcing-typescript-2-0/#the-readonly-modifier)### Pure functions
JavaScript is [context-sensitive](http://staltz.com/is-your-javascript-function-actually-pure.html) when it comes to function purity.### Expressions > statements
### No null or undefined
- TypeScript 2.0 has [non-nullable types](https://blogs.msdn.microsoft.com/typescript/2016/09/22/announcing-typescript-2-0/#non-nullable-types)
- Flow has [`Maybe` types](https://flowtype.org/docs/nullable-types.html#_)
- Elm has [`Maybe` types](https://guide.elm-lang.org/error_handling/maybe.html)