CommunityNews

CommunityNews

Preface - an opinionated functional programming library for OCaml

Preface

Preface is an opinionated library designed to facilitate the handling of recurring functional programming idioms in OCaml. Many of the design decisions were made in an attempt to calibrate, as best as possible, to the OCaml language. Trying to get the most out of the module language. The name “preface” is a nod to “Prelude”.

When learning functional programming, one is often confronted with constructs derived (or not) from category theory. Languages such as Haskell offer very complete libraries to use them, and thus, facilitate their learning. In OCaml, it often happens that these abstractions are buried in the heart of certain libraries/projects (Lwt, Cmdliner,Bonsai, Dune etc.). This is why one of the objectives of Preface is to propose tools for concretising these abstractions, at least as a pedagogical tool.

Is Preface useful

Since OCaml allows for efficient imperative programming, Preface is probably not really useful for building software. However, we (the maintainers) think that Preface can be useful for a few things:

  • technical experimentation with abstractions (especially those from the Haskell world) that allow programming in a fun style.
  • As an educational tool. Many teaching aids generally only offer the minimal interfaces to these abstractions. Preface tries to be as complete as possible.
  • It was a lot of fun to make. The last point is obviously the lightest but building Preface was really fun! So even if some people won’t see the point… we had fun making it!..

Read in full here:

This thread was posted by one of our members via one of our news source trackers.

Where Next?

Popular Backend topics Top

First poster: bot
Release A powerful web framework written in Nim · planety/prologue. Prologue: A powerful web framework written in Nim We are proud to ...
New
New
First poster: bot
A little over a year ago I created the rib static site generator in Haskell based on Shake and ghcid. Later that year I built Neuron (...
New
OrlaghNeary
First time posting here and disclaimer, I work with Microsoft! I partner with Microsoft Research and there are so many cool projects unde...
New
First poster: bot
Turn (almost) any Python command line program into a full GUI application with one line
New
First poster: bot
Maddy Mail Server implements all functionality required to run a e-mail server. It can send messages via SMTP (works as MTA), accept mess...
New
First poster: bot
Check if an email address exists without sending any email, written in Rust.
New
kagermanov27
Daath AI Parser is an open-source application that uses OpenAI to parse visible text of HTML elements. Interactive Example on Replit Li...
New
fi_mihej
I’ve released “InterProcessPyObjects” Python package. It provides high-performance and seamless sharing and modification of Python object...
New
kirkjkrauss
I’m not the first developer to code a method dedicated to matching the classic ‘*’ and ‘?’ wildcards in Rust.  But I may be the first to...
New

Other popular topics Top

malloryerik
Any thoughts on Svelte? Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue...
New
DevotionGeo
I know that these benchmarks might not be the exact picture of real-world scenario, but still I expect a Rust web framework performing a ...
New
AstonJ
We have a thread about the keyboards we have, but what about nice keyboards we come across that we want? If you have seen any that look n...
New
AstonJ
Inspired by this post from @Carter, which languages, frameworks or other tech or tools do you think is killing it right now? :upside_down...
New
PragmaticBookshelf
Tailwind CSS is an exciting new CSS framework that allows you to design your site by composing simple utility classes to create complex e...
New
New
PragmaticBookshelf
Build efficient applications that exploit the unique benefits of a pure functional language, learning from an engineer who uses Haskell t...
New
Help
I am trying to crate a game for the Nintendo switch, I wanted to use Java as I am comfortable with that programming language. Can you use...
New
PragmaticBookshelf
Develop, deploy, and debug BEAM applications using BEAMOps: a new paradigm that focuses on scalability, fault tolerance, and owning each ...
New
AstonJ
Curious what kind of results others are getting, I think actually prefer the 7B model to the 32B model, not only is it faster but the qua...
New