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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id E500D82355 for ; Thu, 25 Jan 2018 17:25:17 +0100 (CET) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=yawar.amin@gmail.com; spf=Pass smtp.mailfrom=yawar.amin@gmail.com; spf=None smtp.helo=postmaster@mail-it0-f46.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of yawar.amin@gmail.com) identity=pra; client-ip=209.85.214.46; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yawar.amin@gmail.com"; x-sender="yawar.amin@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of yawar.amin@gmail.com designates 209.85.214.46 as permitted sender) identity=mailfrom; client-ip=209.85.214.46; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yawar.amin@gmail.com"; x-sender="yawar.amin@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-it0-f46.google.com) identity=helo; client-ip=209.85.214.46; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yawar.amin@gmail.com"; x-sender="postmaster@mail-it0-f46.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AIKKH8hEtGI4plurW3Crwnp1GYnF86YWxBRYc798d?= =?us-ascii?q?s5kLTJ78o8mwAkXT6L1XgUPTWs2DsrQY07OQ6/iocFdDyK7JiGoFfp1IWk1Nou?= =?us-ascii?q?QttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZr?= =?us-ascii?q?KeTpAI7SiNm82/yv95HJbAhEmCexbaluIBmqsA7cq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ascii?q?tgtAF+M5qvCML4fq7omKaIhX7pEZhfZ2QAAVeJQy+xKte0HswUYSfXGfdP1zwJ?= =?us-ascii?q?Ub/7Ft0k3BCq8Q7mk/9pcrSS9SofupbuktNy4r+LmA=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BGBgCmBGpahi7WVdFcHQEBBQELAYNpA?= =?us-ascii?q?YEyJweDVoE5l1SGA4YIh2aHawqFOwKCEQcZBwQzFQEBAQEBAQEBAQEBEgEBAQg?= =?us-ascii?q?LCwgoL4I4JAGCRwYjHQEbHQEDDAYDAgQHNwICIgERAQUBHAYTCIoUAQMVlwCRH?= =?us-ascii?q?UCMFIIFBQEcgwsFg2AKGScNWYIyAQEBAQEFAQEBAQEBGgIGEoQ/ghWBV4UWgy8?= =?us-ascii?q?EgU8BAYM1gmUBBIpniGeQPIJIkxqCG4IDiDOHVJdGFAUggRc1gXMzGiNSMoF4g?= =?us-ascii?q?kUPEAyCBSM3i36CPAEBAQ?= X-IPAS-Result: =?us-ascii?q?A0BGBgCmBGpahi7WVdFcHQEBBQELAYNpAYEyJweDVoE5l1S?= =?us-ascii?q?GA4YIh2aHawqFOwKCEQcZBwQzFQEBAQEBAQEBAQEBEgEBAQgLCwgoL4I4JAGCR?= =?us-ascii?q?wYjHQEbHQEDDAYDAgQHNwICIgERAQUBHAYTCIoUAQMVlwCRHUCMFIIFBQEcgws?= =?us-ascii?q?Fg2AKGScNWYIyAQEBAQEFAQEBAQEBGgIGEoQ/ghWBV4UWgy8EgU8BAYM1gmUBB?= =?us-ascii?q?IpniGeQPIJIkxqCG4IDiDOHVJdGFAUggRc1gXMzGiNSMoF4gkUPEAyCBSM3i36?= =?us-ascii?q?CPAEBAQ?= X-IronPort-AV: E=Sophos;i="5.46,412,1511823600"; d="scan'208,217";a="310673548" Received: from mail-it0-f46.google.com ([209.85.214.46]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 25 Jan 2018 17:25:07 +0100 Received: by mail-it0-f46.google.com with SMTP id p124so10461321ite.1 for ; Thu, 25 Jan 2018 08:25:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=FsHnbs+y2K5x3MpvXFC+VukQeCSEnmXydayOdtGdFdU=; b=SRtU37/lq/LNGmL1dzGeU5d5soV+NhZ0U2SkFKClmf1GP6x8ibU9E27ikk4oM22414 XNcfSJmIaj/9qmMCruMxWx+1RT9z1CykH5O7KVipfQ01Doldu0L95JcFIMcd1pxy367e yQPNEf/hMOSxXMYa34J+1xeOC080LZQel8JYCXld47c3FCcglr1tEGPyZX/Oq1DdOZYG RHt5wl88KJYlrQnyVYnBP9EIaiyhQ97SO0lvPBg/cZjEqg6aH6tCaBCNyYOIk3m6LXFx qGnGGm5hzebAajClbFHhDGxnlF19FMSU+eL8UYt7bwFq3SNWuhRJW/o7XDmrQ9+xTtyW rTIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=FsHnbs+y2K5x3MpvXFC+VukQeCSEnmXydayOdtGdFdU=; b=ZgTQsUcwzdbNJbVnAEVPrlmNJLJ4MbLq6/R8p64cW2fNViz12RUkl/TfAjGVWrAr9+ 6Tra7cYybc+0QEGw15RqrYNpJTMdLYPjnJILXE7i64pS1GIaUE1LlpiDaDg/CnVxSKes cEcDIw6lH38y7QEV2oWld4f7wNid30hcbM7uvEpqbtSP5KUflL3dsnCrjv+C17McseEi E3GeCzeZDU0+QGjaRevVOhieAzZE4LMYmaM4bhbg1W8T7nFqf1Ez+4mltlgOaATwnGIg p221ihdcuDuKckH1yFo0rUwT+0VgwTItQZdJhsBd3y4aO2VLtGDxg7+cMrTGztCcEtZr gKTg== X-Gm-Message-State: AKwxytfpIKhAoq14vxetWB2qiIMt0CkF6wUMSuQMXN1BgOqxDB/vf8PL 7dCzABrxaqPa4uUivV6Me5b8hIMQ/OBICH/OnA== X-Google-Smtp-Source: AH8x227lRcxiDfnsVlh9ATQEvnHwJEOJAdkO6Pwn/LNa3XDF3brkJvOgK76ljFabFy48WLERlrtBS6CXSiBWQV8im0g= X-Received: by 10.36.72.5 with SMTP id p5mr13363660ita.70.1516897506432; Thu, 25 Jan 2018 08:25:06 -0800 (PST) MIME-Version: 1.0 Received: by 10.2.67.86 with HTTP; Thu, 25 Jan 2018 08:24:45 -0800 (PST) In-Reply-To: References: <20180123145453.GA1916@Magus.localnet> <20180123231432.GA20089@topoi.pooq.com> From: Yawar Amin Date: Thu, 25 Jan 2018 11:24:45 -0500 Message-ID: To: =?UTF-8?B?TWF0ZWogS2/FocOtaw==?= Cc: Ocaml Mailing List Content-Type: multipart/alternative; boundary="001a11462eae081bce05639c3934" Subject: Re: [Caml-list] Are record types generative? --001a11462eae081bce05639c3934 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, On Thu, Jan 25, 2018 at 5:49 AM, Matej Ko=C5=A1=C3=ADk wrote: > [...] > It very much depends on what you (honestly) care about. > > If you do not care about readability of the programs you write, then it is > "tooling issue" > (like in "Use Merlin bro!") > Readability means different things to everyone. There's no guaranteed recipe for achieving it. Ultimately, it's one of those things that, you'll know it when you see it. It's true though, Merlin is also not the tool that will solve everything for everyone. There's no substitute for building your own mental model of the code as you read it. If you care about readability, then ephemeral Merlin (or whatever) tooltips > are not exactly the same stuff > as type information that is directly, permanently, unconditionally present > in the source code. > In OCaml, two things really aid in readability: it's idiomatic to use module prefixes, and it's idiomatic to provide interface files with full typing information. Anyone who is reading the code seriously can use those to boost their understanding. =46rom the reader's point of view, it is not the same thing, really. > The thing is, there are different kinds of readers with different needs. When you are a newcomer to the codebase, you need more help to understand what's going on. But (hopefully) as you get more and more familiar with it, which should be the majority of the time you spend reading it, you don't need all the noise of typing information in implementation files. You already have a model of what the types are and if you're unclear about something, you have everything I mentioned before as well as being able to just run quick experiments and seeing what errors the typechecker gives you. In addition to that, when one uses polymorphic variants heavily, > the presence or absence of typing annotations makes a drastic impact on > the ability of typing errors the compiler can generate. > Sure, it's really helpful to hint to the compiler what kinds of errors it should report. But this is not a common use case=E2=80=93the compiler is ac= tually pretty good at inferring basic nominal types. --001a11462eae081bce05639c3934 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

On Thu, Jan 25, 2018 at 5:49 AM, Matej Ko=C5=A1=C3=ADk <mail= @matej-kosik.net> wrote:
[.= ..]
It very much depends on what you (honestly) care about.

If you do not care about readability of the programs you write, then it is = "tooling issue"
(like in "Use Merlin bro!")

R= eadability means different things to everyone. There's no guaranteed re= cipe for achieving it. Ultimately, it's one of those things that, you&#= 39;ll know it when you see it.

It's true thoug= h, Merlin is also not the tool that will solve everything for everyone. The= re's no substitute for building your own mental model of the code as yo= u read it.

If you care about readability, then ephemeral Merlin (or whatever) tooltips= are not exactly the same stuff
as type information that is directly, permanently, unconditionally present = in the source code.

In OCaml, two thing= s really aid in readability: it's idiomatic to use module prefixes, and= it's idiomatic to provide interface files with full typing information= . Anyone who is reading the code seriously can use those to boost their und= erstanding.

>From the reader's point of view, it is not the same thing, really.
<= /blockquote>

The thing is, there are different kinds of = readers with different needs. When you are a newcomer to the codebase, you = need more help to understand what's going on. But (hopefully) as you ge= t more and more familiar with it, which should be the majority of the time = you spend reading it, you don't need all the noise of typing informatio= n in implementation files. You already have a model of what the types are a= nd if you're unclear about something, you have everything I mentioned b= efore as well as being able to just run quick experiments and seeing what e= rrors the typechecker gives you.

In addition to that, when one uses polymorphic variants heavily,
the presence or absence of typing annotations makes a drastic impact on the= ability of typing errors the compiler can generate.
<= br>
Sure, it's really helpful to hint to the compiler what ki= nds of errors it should report. But this is not a common use case=E2=80=93t= he compiler is actually pretty good at inferring basic nominal types.

--001a11462eae081bce05639c3934--