caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Emmanuel Surleau <emmanuel.surleau@gmail.com>
To: caml-list@inria.fr
Subject: [Caml-list] Fwd: We need a rich standard library distributed with OCaml, really
Date: Thu, 27 Aug 2015 20:42:30 +0200	[thread overview]
Message-ID: <CADd2AG6V4fkgx0i8UhosKdUTm6fGUVrmPM9_n4BiGBLyKgAiig@mail.gmail.com> (raw)
In-Reply-To: <20150827174554.14858.6618@localhost>

[-- Attachment #1: Type: text/plain, Size: 5357 bytes --]

---------- Forwarded message ----------
From: Emmanuel Surleau <emmanuel.surleau@gmail.com>
Date: Thu, Aug 27, 2015 at 7:45 PM
Subject: Re: [Caml-list] We need a rich standard library distributed with
OCaml, really
To: Gabriel Scherer <gabriel.scherer@gmail.com>


Quoting Gabriel Scherer (2015-08-27 10:17:08)
> Hongbo, you are saying at the same time that:
> - you want a *rich* (in particular, large) standard library
> - existing third-party base libraries are too large for your taste
>
> If we magically imported one of those libraries in the OCaml
> distribution, it would still be large, and it would still have
> inter-dependencies between its modules. Why are you unwilling to
> depend on a library provided outside the distribution?
>
> Depending on external libraries used to be a problem when there was no
> consensus on OCaml packaging (no longer than a few years ago people
> where reluctant to even use ocamlfind). We now have a reasonable
> consensus on a packaging story, and installing third-party libraries
> has never been as easy as it is today -- except on Windows, meh.
> I think you should embrace the idea of depending on software outside
> the OCaml distribution.
>
> (I understand there are legal issues that make it difficult for some
> companies to use third-party software. It is not our job to work in
> stead of their lawyers.)
>
> Many of the issues people have with the library distributed with in
> the compiler distribution come from the fact that it is included in
> the compiler distribution -- and thus imposes a maintenance burden on
> the same group, same backward-compatibility constraints, etc. The
> general movements in the current years is to make the compiler
> distribution *smaller*, not *larger*, to avoid these problems.
>
>
> I think the criticism you make of existing standard library
> alternatives is fair (at least the Batteries part corresponds to
> something that I think is consensual¹). My preferred solution to help
> solve these issues is to contribute work to improve these libraries.
>
> ¹: Simon Cruanes has started good work to split Batteries in smaller
> modules that do not depend on each other. This effort is currently
> stalled, in large part by my personal fault (I was too
> perfectionist in hoping for doing this and at the same time preserving
> backward-functionality). Simon may have made the good call in starting
> his own parallel library effort suiting his relatively opinionated
> view of how things should be. I hope to get more time to devote to
> Batteries at some point, and resolve that tension by proposing a good
> compromise (integrating most of Simon's work) for a v3 release.
>
> There remain the issue that having several "base libraries" risks
> fragmenting the community in incompatible islands of software usage.
> It is true that shoving stuff into the compiler distribution is a way
> to resolve this excess of choice by authority, but it is manifest that
> no one currently wants to bear this authority and the responsibilities
> that come with it. (Except possibly on very localized issues, as the
> `result` type that is being integrated in 4.03+dev).
>
> I think the way forward is to have smaller independent packages that
> do not require so large a buy-in and consensus. We could have *one*
> package that provides many useful functions for lists, and one
> separate package with many useful functions for strings. In this style
> Daniel Bünzli beautifully documented small packages, or David Sheets
> doing-one-thing libraries would be role models to follow. This wasn't
> an option when Batteries or Core were started, because the packaging
> story was too confused, but it is now and we should take advantage of
> it. Given time (and help?) I hope to evolve Batteries towards this
> model.

(forwarding the original email to the list as I had sent only to Gabriel by
accident)

Well, as far collections go, you don't need "large libraries". You just
need a
to_gen method in collection types in the stdblib. The gen type itself
is trivially reimplementable, so it's not a hard dependency on ccube's gen
package, and gen itself is a single module that could, if there was the
will, be
integrated in the stdlib at little cost. This would greatly extend the
flexibility of existing data structures.

Another issue to consider is that you need to distinguish what is "sugar"
and
what is essential infrastructure. You do not want to farm out
infrastructure to
third parties. Otherwise, this puts maintainers of OCaml libraries in the
difficult position of choosing for their users. It's mostly a question of
data
types. If, for instance, the stdlib had sensible data types for handling
time
information, it would be acceptable to leave advanced time-handling
mechanics to
specialized libraries outside of the stdlib, as long as they were able to
rely
on a *lingua franca* of standard types.

Of course, all that wouldn't solve the design issues of the standard library
(eg, Str, exceptions everywhere, etc.), but adding gen (or at least hooks
for
gen) and a number of common data structures would really go a long way.

I wouldn't mind contributing a few hours working on that, assuming we could
reach some kind of consensus.

Cheers,

Emm

[-- Attachment #2: Type: text/html, Size: 6258 bytes --]

  parent reply	other threads:[~2015-08-27 18:42 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-27  2:52 [Caml-list] " Hongbo Zhang
2015-08-27  6:59 ` Christoph Höger
2015-08-27  7:18 ` Anthony Tavener
2015-08-27  8:17   ` Gabriel Scherer
2015-08-27 10:35     ` Romain Bardou
2015-08-27 19:55       ` Martin DeMello
2015-08-27 20:10         ` Yotam Barnoy
2015-08-27 23:24           ` Drup
2015-08-28 13:23           ` Philippe Veber
2015-08-27 20:17         ` Raoul Duke
2015-08-27 23:10       ` Martin Jambon
     [not found]     ` <20150827174554.14858.6618@localhost>
2015-08-27 18:42       ` Emmanuel Surleau [this message]
2015-08-27 21:17     ` Paolo Donadeo
2015-08-27 21:51       ` Oliver Bandel
2015-08-27 21:56         ` Oliver Bandel
2015-08-27 22:04           ` Oliver Bandel
2015-08-28  0:50     ` Hongbo Zhang
2015-08-31 16:06     ` Stéphane Glondu
2015-08-31 16:14       ` Francois Berenger
2015-08-31 16:44         ` Hendrik Boom
2015-08-31 18:04           ` Ian Zimmerman
2015-08-31 17:26         ` Stéphane Glondu
2015-09-01 15:06           ` Anil Madhavapeddy
2015-08-31 17:34       ` Oliver Bandel
2015-09-01 13:46       ` Gabriel Scherer
2015-08-27  8:07 ` Sébastien Hinderer
2015-08-27  8:20   ` Daniil Baturin
2015-08-27  9:34     ` Edouard Evangelisti
2015-08-28  9:07       ` r.3
2015-08-27  8:12 ` Francois Berenger
2015-08-27 11:57   ` Drup
2015-08-27 14:17 ` Yaron Minsky
2015-08-27 16:00   ` Jesse Haber-Kucharsky
2015-08-28  0:33     ` Hongbo Zhang
2015-08-28  1:53       ` Daniel Bünzli
     [not found]       ` <20150828.140826.2157566405742612169.Christophe.Troestler@umons.ac.be>
2015-08-28 12:38         ` Thomas Braibant
2015-08-28 13:00           ` [Caml-list] opam license field (was Re: We need a rich standard library distributed with OCaml, really) Daniel Bünzli
2015-08-28 13:06             ` David Sheets
2015-08-28 14:01         ` [Caml-list] We need a rich standard library distributed with OCaml, really Oliver Bandel
2015-08-31 15:26           ` Hendrik Boom
2015-08-28 14:35         ` Alain Frisch
2015-08-29 19:02           ` David MENTRÉ
2015-08-31 12:37             ` Jon Harrop
2015-08-31 15:05               ` Emmanuel Surleau
2015-08-31 17:31                 ` Oliver Bandel
2015-08-28 15:02         ` Simon Cruanes
2015-08-28 15:27           ` Gabriel Scherer
2015-08-28 15:51         ` Oliver Bandel
2015-08-31 18:40       ` Ashish Agarwal
2016-03-27 20:54     ` Jon Harrop
2016-03-27 21:21       ` Simon Cruanes
2016-03-27 23:48       ` Yaron Minsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADd2AG6V4fkgx0i8UhosKdUTm6fGUVrmPM9_n4BiGBLyKgAiig@mail.gmail.com \
    --to=emmanuel.surleau@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).