From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p42DY5Nx018751 for ; Mon, 2 May 2011 15:34:05 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AogCAGWyvk3RVaA2kGdsb2JhbACmFAgUAQEBAQkJDQcUBCGIcZxnjSaECYkSAQEDBoV6BIYMiG2FJ4UTO4Ejghk X-IronPort-AV: E=Sophos;i="4.64,302,1301868000"; d="scan'208";a="107257646" Received: from mail-pw0-f54.google.com ([209.85.160.54]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 02 May 2011 15:33:59 +0200 Received: by pwj8 with SMTP id 8so3995942pwj.27 for ; Mon, 02 May 2011 06:33:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to:x-mailer; bh=wu2ZRUD8XSk67U/tKBv3UTwhaB0isx/YC+MxpRFe3Kc=; b=OTqCjVPXxdGYUyyxgb6BOumsgcDm6FJgsHiAIxRHBHK1gZc1PAhUdYDJKxocNmcUc1 NLS8Ji6VWUA2MfVS6sz/6YIZ1+UWJm5alv2FF07HtwUpdsC0Uk3MjpkTtiThNcRgVA1P gsK3OjW+KTr0cR3so5IDo+yC7aCKOrtvpPq5k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=dClgmJM/0Z0f/sQS/ad6++9ix6MNbPGiijd/oX4eYPgtn+aqR5aQyjES6rYm22fwB2 nlDA5VB3C283Q/x0R7FBFkvfqMksiLukZ8A54zybOcEfMbvymuo1T6QI2J9gt6Itl/Ph vsOeG6YHGr8fTKj+8m3ZDUwEtZCFRNMsp9iBA= Received: by 10.68.10.98 with SMTP id h2mr8547715pbb.372.1304343238212; Mon, 02 May 2011 06:33:58 -0700 (PDT) Received: from tet.garrigue.jp (58x158x128x157.ap58.ftth.ucom.ne.jp [58.158.128.157]) by mx.google.com with ESMTPS id t10sm3826243pbh.9.2011.05.02.06.33.56 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 02 May 2011 06:33:57 -0700 (PDT) Sender: Jacques Garrigue Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Jacques Garrigue In-Reply-To: <4DBEAE90.9050506@users.sourceforge.net> Date: Mon, 2 May 2011 22:33:54 +0900 Cc: caml-list users Message-Id: <30BAF5B6-7829-4A50-950C-22AC03E65AFE@math.nagoya-u.ac.jp> References: <4DBEA464.7090102@users.sourceforge.net> <4DBEAE90.9050506@users.sourceforge.net> To: Create Software X-Mailer: Apple Mail (2.1084) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p42DY5Nx018751 Subject: Re: [Caml-list] Pattern-matching on Ocaml records On 2011/05/02, at 22:16, Create Software wrote: >> Only the record field itself is mutable. Extracting only gives you a value, not a reference. > > Sure, but how come that > let reset {label = lbl} = lbl <- 0;; > works fine in Caml Light and not in OCaml? This has been deprecated. Namely, this introduced a notion of lvalue, only for mutable record labels (and actually also for sum types IIRC). The current approach of always requiring to specify the record is clearer, and it extends naturally the notations a.(i) <- e for arrays s.[i] <- e for strings This said, later on object instance variables were added as lvalues, so the uniformity argument is not so strong... Jacques Garrigue