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 4BD5F7EEBF for ; Thu, 18 Jun 2015 16:49:29 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of micinski@cs.umd.edu) identity=pra; client-ip=128.8.127.44; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="micinski@cs.umd.edu"; x-sender="micinski@cs.umd.edu"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of micinski@cs.umd.edu designates 128.8.127.44 as permitted sender) identity=mailfrom; client-ip=128.8.127.44; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="micinski@cs.umd.edu"; x-sender="micinski@cs.umd.edu"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@egg.cs.umd.edu) identity=helo; client-ip=128.8.127.44; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="micinski@cs.umd.edu"; x-sender="postmaster@egg.cs.umd.edu"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BdAQB62YJVnCx/CIBchEMGgxjDbgdMAQEBAQEBEgEBAQEBCBQJT4Q7ER0BATglDwImAiQSAQUBIhsaiA2iWz4xik9whGQBBYxIhTMGgSGOPINdgUMBjAqHaotJllsSI4EVhDtTgkgBAQE X-IPAS-Result: A0BdAQB62YJVnCx/CIBchEMGgxjDbgdMAQEBAQEBEgEBAQEBCBQJT4Q7ER0BATglDwImAiQSAQUBIhsaiA2iWz4xik9whGQBBYxIhTMGgSGOPINdgUMBjAqHaotJllsSI4EVhDtTgkgBAQE X-IronPort-AV: E=Sophos;i="5.13,638,1427752800"; d="scan'208";a="136844162" Received: from egg.cs.umd.edu ([128.8.127.44]) by mail3-smtp-sop.national.inria.fr with ESMTP; 18 Jun 2015 16:49:28 +0200 Received: from mail-ob0-f177.google.com (mail-ob0-f177.google.com [209.85.214.177]) (Authenticated sender: micinski) by egg.cs.umd.edu (Postfix) with ESMTPSA id 02D9C68038F for ; Thu, 18 Jun 2015 10:49:29 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.umd.edu; s=csmx; t=1434638969; bh=Pfa9FJ0PlLnq3fsJAmd3xb6A84RHc5fidhx7xhNU8xo=; h=Date:Subject:From:To; b=wBhg3vpfQh+erqyoj9loOIqkzxqYPbm7ANWElRHHFKmNKJOmAuMcOlyGX00FVtuuj TRGoLHnRGvbqDS4qD+og0tepQfpuF8uh8P5lMR768riN6Fsioz71No8ACyCaQ/XVCk XYs0Me7X4NSqTVToakPjZA/uhnjWvx757pEpM4U4= Received: by obbgp2 with SMTP id gp2so55585609obb.2 for ; Thu, 18 Jun 2015 07:49:25 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.202.217.68 with SMTP id q65mr8703262oig.17.1434638965840; Thu, 18 Jun 2015 07:49:25 -0700 (PDT) Received: by 10.182.111.2 with HTTP; Thu, 18 Jun 2015 07:49:25 -0700 (PDT) Date: Thu, 18 Jun 2015 10:49:25 -0400 Message-ID: From: Kristopher Micinski To: "caml-list@inria.fr" Content-Type: text/plain; charset=UTF-8 X-Validation-by: micinski@cs.umd.edu Subject: [Caml-list] Why aren't OCaml constructors functions? This is an obvious question with an answer that is nonobvious to me. One potential reason I could believe is that it might be a performance optimization to ensure that all constructors were known to be fully applied when used. But that seems unnecessary: a simple rewrite rule (even syntactic) would likely fix this for the majority of cases. This leads me to believe it isn't the reason. Another reason might be to avoid potential name clashes. I typically name constructors things that might also be reasonable function names, but not often. I've done a fair amount of googling on this and can't find any threads on this, searching back through this list down to 2012. It's possible I missed something. Kris