Coder Social home page Coder Social logo

rhax's Introduction

Important

This project is discontinued. The original motivation behind it - in all its different forms over the years - was to provide functional-programming style tools that replace some of JavaScript's quirks and inconveniences with elegant, foolproof, perfectly typed and easy to use utilities. It contains some good ideas - one of which evolved into pips, for example - but at the end of the day I couldn't manage to achieve code that filled ticked all these boxes while also being innovative enough to justify its existence.

Rhax

language codecov npm license

Rhax is a JavaScript utility library whose purpose is to make your day-to-day code perfect. It combines the best bits of functional programming with practicality, brevity and a solid type system to produce resilient, elegant code.

Getting started

To get started, head over to our docs.

Design principles

Declarative, Idiomatic & Consice

We believe JavaScript code is best written in a way that emphasizes your logic and intent.

Therefore, Rhax's utilities are designed to be declarative, idiomatic and concise. They're aimed to minimize the amount of gray code in your codebase, replacing it with easy-to-read, elegant operations that focus on your logic.

Functional Programming made practical

Rhax takes a non-traditional approach to functional programming: simplicity.

It's designed to utilize the best of FP - purity, immutability and declarative code - while keeping the paradigm's infamous problems out.

This means Rhax has no unnecessarily complex concepts, no ocean of jargon, and no surrendering your codebase to the paradigm.

For TypeScript users, by TypeScript users

One of Rhax's targets is to bring users the best typing Typescript can provide for common operations.

To this end, it uses generics and other advanced Typescript features commonly and thoroughly. It also provides wrappers for some very common native functions that have poor typing (such as Object.entries()).

And even if you're not using Typescript, chances are your IDE does - and you can still benefits from Rhax's rich typing support through its intellisense.

Other features

  • 🚀 Easy to pick up: Rhax was designed to be intuitive, and is simple to introduce into any codebase.
  • 🪶 Lightweight: A small bundle size and tree-shaking make Rhax’s footprint extremely light.
  • ⚙️ Modern: Rhax is written and built using modern JavaScript syntax and tools.
  • 🤍 Open source: Now and forever.

Why FP?

Functional programming (FP) is a progamming paradigm founded on the ideas of immutability, function purity, and others. It has become increasingly popular over the past few years, and its benefits shine in a variety of applications. Most popular modern languages (JS/TS included) have FP capabilities, and you, like most developers of those languages, are probably already using FP to some degree, perhaps without realizing it.

However, the world of FP has many deep concepts - some rooted in abstract mathematics, some shrouded in FP terminology - and "true" functional programming requires a good understanding of most of those, as well as a commitment to the paradigm that's difficult to "break out" of when needed. This combination of a steep learning curve and a binding commitment is off-putting for many developers (myself included). Rhax was created with this slice of developers in mind - it aspires to provide a simple way for Javascript developers, new and seasoned, to enjoy the benefits of FP without having to climb or move mountains.

Another point is that FP - and its concepts of declarability and function purity in particular - deal extremely well with type systems. It can make a big difference in developer experience and in quality (elegance, brevity and maintainability). This is mostly true for Typescript developers, but can also assist plain Javascript developers through the intellisense features of modern IDEs.

License

MIT

rhax's People

Contributors

dependabot[bot] avatar nitzanhen avatar

Stargazers

 avatar  avatar  avatar  avatar

rhax's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.