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
This is a full alternative implementaion of the Rust language ontop of GCC which the goal to become fully upstream with the GNU toolchain...
New
First poster: bot
Why is it called pie? Because if you pronounce API like “a pie”, then all this consuming and serving of APIs becomes a lot more palatabl...
/go
New
First poster: bot
Today’s the day: We’re very proud to announce Trussed®, an open source framework for modern cryptographic applications, which powers the ...
New
First poster: Carter
https://makepad.dev/ This thread was posted by one of our members via one of our news source trackers.
New
finner
I thought it might be of interest to document some of the Java versioning tools that are available. Here is a very short list to start w...
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
First poster: GermaVinsmoke
This guide collects some of the most common functions of the Elixir Programming Language and explain them conceptual and graphically in a...
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

Other popular topics Top

AstonJ
What chair do you have while working… and why? Is there a ‘best’ type of chair or working position for developers?
New
PragmaticBookshelf
Learn different ways of writing concurrent code in Elixir and increase your application's performance, without sacrificing scalability or...
New
AstonJ
Biggest jackpot ever apparently! :upside_down_face: I don’t (usually) gamble/play the lottery, but working on a program to predict the...
New
PragmaticBookshelf
Rails 7 completely redefines what it means to produce fantastic user experiences and provides a way to achieve all the benefits of single...
New
PragmaticBookshelf
Build efficient applications that exploit the unique benefits of a pure functional language, learning from an engineer who uses Haskell t...
New
PragmaticBookshelf
Author Spotlight Jamis Buck @jamis This month, we have the pleasure of spotlighting author Jamis Buck, who has written Mazes for Prog...
New
PragmaticBookshelf
Author Spotlight Mike Riley @mriley This month, we turn the spotlight on Mike Riley, author of Portable Python Projects. Mike’s book ...
New
DevotionGeo
I have always used antique keyboards like Cherry MX 1800 or Cherry MX 8100 and almost always have modified the switches in some way, like...
New
New
AstonJ
If you’re getting errors like this: psql: error: connection to server on socket “/tmp/.s.PGSQL.5432” failed: No such file or directory ...
New