Our great sponsors
-
rustic
rustic is a TypeScript library providing emulation of Rust's Option and Result types (and some useful wrappers for common js functions as well!) (by franeklubi)
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
You can see them in this file: https://github.com/franeklubi/rustic/blob/main/src/result/helpers.ts
fp-ts has these (named Either and Option). Any advantages of using this library over what fp-ts has to offer? Is it just the (I assume) smaller footprint, or are there other reasons?
Rust used to have Either (std::either::Either), but it was removed some time before Rust 1.0 because it barely got used, and the cases where it was used were better handled by a custom enum. Certainly it fails the informally-defined standard library inclusion criteria: it’s not widely used and doesn’t need to be in the standard library in any way.