From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_WHOIS autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 93F65BC69 for ; Wed, 17 Oct 2007 16:47:41 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAMu8FUfOvjGuoWdsb2JhbACOTgIBAQIFBAYJCAEXgSc X-IronPort-AV: E=Sophos;i="4.21,289,1188770400"; d="scan'208";a="3153217" Received: from web54604.mail.re2.yahoo.com ([206.190.49.174]) by mail2-smtp-roc.national.inria.fr with SMTP; 17 Oct 2007 16:47:37 +0200 Received: (qmail 43619 invoked by uid 60001); 17 Oct 2007 14:47:36 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=ztOQFSHw4rRUGGAwLGM8yVa0w2H82EgCqOKpeXVb0BD4KSD3j0J+dsSdKxI48pnK48FLJFPPsoMj1gZvcNdxr0Z2Rv/UBH+WeDPeJvqSUKzU/ErjTbF0go8BAjuB3EWg+ikD7cDtcmLyF4QyMRV2li5ODjy4I8qXlLR3pKw46TM=; X-YMail-OSG: ytnK6t0VM1kIwjbn0yV4jety3ezLvTg0uQpSmKuMkdLWvAb4uWDn0MnDiDCkYIbbFm7KPApuKsFHb1Lii0PLcvwQwA7otzg3VzKEAmRySI5DsR_cDeyHOhpHcg_2xA-- Received: from [82.155.120.49] by web54604.mail.re2.yahoo.com via HTTP; Wed, 17 Oct 2007 15:47:36 BST Date: Wed, 17 Oct 2007 15:47:36 +0100 (BST) From: Dario Teixeira Subject: Re: [Caml-list] Smells like duck-typing To: caml-list@yquem.inria.fr In-Reply-To: <47161876.7050500@lix.polytechnique.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <219731.38198.qm@web54604.mail.re2.yahoo.com> X-Spam: no; 0.00; ocaml:01 subtyping:01 ugliness:01 cheers:01 carbon:98 polymorphic:01 typing:01 caml-list:01 objective:02 inheritance:03 types:05 disadvantage:08 footprint:08 technically:09 environment:10 > I think your solution is to fully use the "Objective" part of OCaml, > that is, using subtyping (technically it's polymorphic rows typing) : Hi, Yes, you're right. Doing away with the inheritance -- while having the disadvantage of forcing the redeclaration of all common fields -- does allow me to throw away the ugliness of the option types. It is in the end the lesser of two evils... Cheers, Dario ___________________________________________________________ Want ideas for reducing your carbon footprint? Visit Yahoo! For Good http://uk.promotions.yahoo.com/forgood/environment.html