From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 6401B7F168 for ; Thu, 27 Aug 2015 23:51:51 +0200 (CEST) IronPort-PHdr: 9a23:9vyU9hBy6NAqo+PNzjlQUyQJP3N1i/DPJgcQr6AfoPdwSP7/pMbcNUDSrc9gkEXOFd2CrakU0KyI7uu4CSQp2tWojjMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpQAbFhi3DwdpPOO9QteU1JTskb7vsMWDKyxzxxODIppKZC2sqgvQssREyaBDEY0WjiXzn31TZu5NznlpL1/A1zz158O34YIxu38I46FppIZ8VvDxdqE8CLhZFygOMmYv5cStuwOQYxGI4y47VmQInwAAKQHD4Bz+FsP2tirku/BV1iiAJtGwTLZxUzm466ZtDhPl3nRUfwUl+X3a35QjxJlQpwis8kRy Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=oliver@first.in-berlin.de; spf=None smtp.mailfrom=oliver@first.in-berlin.de; spf=None smtp.helo=postmaster@einhorn.in-berlin.de Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of oliver@first.in-berlin.de) identity=pra; client-ip=192.109.42.8; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="oliver@first.in-berlin.de"; x-sender="oliver@first.in-berlin.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of oliver@first.in-berlin.de) identity=mailfrom; client-ip=192.109.42.8; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="oliver@first.in-berlin.de"; x-sender="oliver@first.in-berlin.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@einhorn.in-berlin.de) identity=helo; client-ip=192.109.42.8; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="oliver@first.in-berlin.de"; x-sender="postmaster@einhorn.in-berlin.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CAAQBfhd9VnAgqbcBeg29pBr9zhX8CgTw8EAEBAQEBAQEBEAEBAQEBCAsJCSEugh2CBwEBAwEjBBFGCwsaAhgOAgIhNhkUB4d+AwoIBLFQj0gNhR0oBIEiiTyBA4JPgVNwF4JSgUMFkiWDGIUGhgCBagdLiCWKMoYBgTqCNRyBVm+CTQEBAQ X-IPAS-Result: A0CAAQBfhd9VnAgqbcBeg29pBr9zhX8CgTw8EAEBAQEBAQEBEAEBAQEBCAsJCSEugh2CBwEBAwEjBBFGCwsaAhgOAgIhNhkUB4d+AwoIBLFQj0gNhR0oBIEiiTyBA4JPgVNwF4JSgUMFkiWDGIUGhgCBagdLiCWKMoYBgTqCNRyBVm+CTQEBAQ X-IronPort-AV: E=Sophos;i="5.17,423,1437429600"; d="scan'208";a="144009309" Received: from einhorn.in-berlin.de ([192.109.42.8]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Aug 2015 23:51:50 +0200 X-Envelope-From: oliver@first.in-berlin.de X-Envelope-To: Received: from localhost (yak.in-berlin.de [192.109.42.109]) by einhorn.in-berlin.de (8.14.4/8.14.4/Debian-4) with ESMTP id t7RLpn3f031033 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 27 Aug 2015 23:51:49 +0200 Received: from x55b21205.dyn.telefonica.de (x55b21205.dyn.telefonica.de [85.178.18.5]) by webmail.in-berlin.de (Horde Framework) with HTTP; Thu, 27 Aug 2015 23:51:49 +0200 Date: Thu, 27 Aug 2015 23:51:49 +0200 Message-ID: <20150827235149.Horde.bl0KoI85Wwz2hwhmcaeUltR@webmail.in-berlin.de> From: Oliver Bandel To: caml-list@inria.fr References: <1C02B1E2-D17D-4008-998E-B17048C62DFA@gmail.com> In-Reply-To: User-Agent: Horde Application Framework 5 Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline Subject: Re: [Caml-list] We need a rich standard library distributed with OCaml, really Zitat von Paolo Donadeo (Thu, 27 Aug 2015 23:17:50 +0200) > I'm possibly the only one considering a small, essential, base library a > *value* for the OCaml language and community? No, I also prefer the slim lib approach ;-) But nevertheless, some more functions would make sense to me too. The String.split, mentioned by the orig-poster, is a good idea, IMHO. Adding this as Feature-wish in the Bugtracking system would be a good idea, I think. Some things need a while... sometimes too long, IMHO, e.g. feature wish Hashtbl.keys is in the bugtracker since june 2013. :( I hope it will be added before 2020 ;-) But sometimes, it's surprising, what has ben added. After looking at the documentation after long time (didn't awaited new things *ahem*) I found String.trim for example. Very useful, but I did not expected that this would be added. So, even though I prefer a slim std-lib, some functions are still so common, that they should be added. I also was surprised to see ( |> ) was added. Someone in this thread mentioned opt_apply (opt_eval) functions. Very useful, and even though very simple, it's very powerful. Especially combined with ( |> ). ( ( |> ) also is easy to write, but soooo helpful, that it's a good idea, to have it coming with OCaml system itself.) So, opt_apply functions are of the same kind as ( |> ) ---> easy to write, but should be part of the OCaml distribution. For the advantages of opt_apply, see "Scott Wlaschin - Railway Oriented Programming -- error handling in functional languages" https://vimeo.com/97344498 I really enjoyed that talk. It started me thinking about my code, seeing option-type not as something strange, that sometimes makes sense, but as something, which is really great and might be used more frequently ... There are also slides accompaning the talk somewhere, but I don't have the link at hand. > > The OCaml standard library let the user free to decide what library is the > best choice for each project. I'm currently using Batteries, or Core, for > very different tasks. And sometimes none of the two. I rely on OCaml's standard lib and a lot of smaller libs. When thinking about Batteries, Core and others, I just could not decide for one of them. Looking at them in detail might eat more time than writing the needed code by myself. And it saves much space, NOT to use BIG libraries... especially, if most of that stuff is not needed. I prefer finer grained solutions. But of course, it's good to have all these libraries, just in case, it would match the needs (of someone). > > I'm very happy and grateful not to have an OCaml counterpart of the STL or, > worse, the Java Platform! heheh. Ciao, Oliver