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=2.8 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_NEUTRAL 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 ADAEDBBAF for ; Tue, 7 Apr 2009 15:39:50 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq8BAFP02knRVYT0m2dsb2JhbACVZj8BAQEBAQgJCgIHD6cLB4ECj2kBAwEDg3oGhUg X-IronPort-AV: E=Sophos;i="4.39,337,1235948400"; d="scan'208";a="24131360" Received: from an-out-0708.google.com ([209.85.132.244]) by mail2-smtp-roc.national.inria.fr with ESMTP; 07 Apr 2009 15:39:50 +0200 Received: by an-out-0708.google.com with SMTP id c38so1759542ana.3 for ; Tue, 07 Apr 2009 06:39:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:reply-to:to:subject:date :user-agent:cc:references:in-reply-to:content-type :content-transfer-encoding:content-disposition:message-id; bh=dYC3jKFasOvSJHkjSfM8FZ0zLn0X8y2Q1OxLkkRKcn4=; b=XJat++iaYBFItKtBNI8okZP/hd7w/Cx34jC/3pK/JBD4PK9Np9vY6KEMecmSIsFvff PNLjRoEPi76V8pCq+i5uikO9q4lj426H3781p3lJfZgQGT9Zke3x8xKB65xMKDkG42AM s5xTfZW4gdxYNL/y28hwBS64y6w28kUNiRqBA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:reply-to:to:subject:date:user-agent:cc:references:in-reply-to :content-type:content-transfer-encoding:content-disposition :message-id; b=rvgo3oTf3L+6rFB/VywYqGToNYaWQVutfnn87ZeK1w3D0L7RbpqTjM9CHuFBddqC3j dEfDSu6HGOAPyJrFNF6WE849/Pq3sS0EXNfBwunJe8gaG/wZSg/v0hwzFAejM+IeI9dw RR7C8LW9o1rWmUW3v79JmD5wd88heybgnKXnQ= Received: by 10.100.13.2 with SMTP id 2mr239455anm.132.1239111589052; Tue, 07 Apr 2009 06:39:49 -0700 (PDT) Received: from ?192.168.0.102? (c-98-219-43-7.hsd1.ga.comcast.net [98.219.43.7]) by mx.google.com with ESMTPS id d12sm20991148and.24.2009.04.07.06.39.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 07 Apr 2009 06:39:47 -0700 (PDT) From: Peng Zang Reply-To: peng.zang@gmail.com To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Subtyping Date: Tue, 7 Apr 2009 09:39:43 -0400 User-Agent: KMail/1.9.9 Cc: David MENTRE , Goswin von Brederlow , caml-list@inria.fr References: <873aclf1z8.fsf@frosties.localdomain> <3d13dcfc0904070041l5d59ec76nc97643fc862f334c@mail.gmail.com> In-Reply-To: <3d13dcfc0904070041l5d59ec76nc97643fc862f334c@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904070939.46583.peng.zang@gmail.com> X-Spam: no; 0.00; subtyping:01 hash:01 ocaml:01 ocaml:01 idioms:01 cheers:01 peng:98 peng:98 2009:98 2009:98 48,:98 wrote:01 wrote:01 caml-list:01 imperative:01 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 07 April 2009 03:41:32 am David MENTRE wrote: > Hello, > > On Tue, Apr 7, 2009 at 07:48, Goswin von Brederlow wrote: > > In the last 2 weeks I've been playing around with lots of different > > ways to do the same thing to get a feel for what style suites me > > best. If you have improvements or alternative ways of doing the two > > things below let me know. > > Well, if you are learning OCaml, I would advise you to read regular > OCaml code, e.g. the standard library. You'll learn The Right OCaml > Style(tm). Certainly reading the standard library is good. Useful for learning techniques, idioms, etc.. I wouldn't say that there is one Right OCaml Style(tm) though. Actually part of why I like OCaml is that it supports imperative, object oriented and functional paradigms and you can switch between them depending on the task. Cheers, Peng -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) iD8DBQFJ21eifIRcEFL/JewRAptXAJwPec++ykZ6YjmLuUtdfrZw3IrXEwCbBkeB juGHNPOqJds1rDZd8S1BQEQ= =foQf -----END PGP SIGNATURE-----