4

GitHub - mlanza/atomic: Write Clojuresque functional core, imperative shell prog...

 1 year ago
source link: https://github.com/mlanza/atomic
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Atomic

A wholemeal, Clojure-inspired approach for programming. Treats native JavaScript data structures (e.g. Object, Array) by default as immutable data. Includes persistent data structures via Immutable.js integration.

Provides a robust core for web development rich enough to meet typical use cases so that third-party integrations can be minimized.

Promotes a uniform functional api. Functions drive all queries and commands. Arguments are explicitly passed to functions with most functions preferring an explicit self in the first position. The use of this is largely eliminated. All properties (set usually once during construction) are treated as privates (no underscore prefix needed) and aid in REPL-driven development.

Supplants concretion thinking with abstraction thinking. Don't ask an object, "What's your type?" but rather "What's your behavior? Your interface?" Take reactives — streams emit events and signals emit time-changing values. Disregard the actual object types. While a Cell is a kind of signal (nearly analagous to a Clojure atom) and a Subject a kind of stream, an observable can be constructed to behave as either. Simply put: objects must be thought of by the roles they play. Furthermore, functions (e.g. pure queries) can take types and return different types. Thus, abstractions. In this protocols are the foundation. They make it possible to integrate third-party types while maintaining a uniform api.

Offers point-free programming without a build step. This is demonstrated in autopartial and autopartial-less. When pipeline operators and partial application are eventually ratified into JavaScript this kludge can be deprecated.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK