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.1 required=5.0 tests=AWL,HTML_MESSAGE,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 discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 6D791BC0B for ; Tue, 16 Jan 2007 21:48:53 +0100 (CET) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l0GKmqAY020212 for ; Tue, 16 Jan 2007 21:48:53 +0100 Received: by ug-out-1314.google.com with SMTP id k3so1106180ugf for ; Tue, 16 Jan 2007 12:48:52 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:mime-version:content-type:x-google-sender-auth; b=Nfovb6K5xqgLdkgTjxCEJVzdMAixbAQbg9NOE2PZSE390/H8+SYEMqfIt8eBP47YqgUF39hywUdLV3PRQkjlRL3RqcbndknU6qYImxez7SdsgwS669ETbpdMlebb7r5fHJRBzj9ZQqTfVUeX7uXAS/KmS3bEOhfuAoKgLvs6Hng= Received: by 10.66.219.11 with SMTP id r11mr8239835ugg.1168980532513; Tue, 16 Jan 2007 12:48:52 -0800 (PST) Received: by 10.66.243.3 with HTTP; Tue, 16 Jan 2007 12:48:52 -0800 (PST) Message-ID: <2a1a1a0c0701161248l5a1d9ad9q739da9c593fc5219@mail.gmail.com> Date: Tue, 16 Jan 2007 15:48:52 -0500 From: "Mike Lin" Sender: nilekim@gmail.com To: caml-list@inria.fr Subject: ocaml+twt v0.90 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_112990_12553089.1168980532386" X-Google-Sender-Auth: 232c7ad080f5372b X-Miltered: at discorde with ID 45AD3A34.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; mikelin:01 ocaml:01 ocaml:01 haskell:01 mikelin:01 syntax:01 printf:01 printf:01 camlp:01 haskell:01 syntax:01 camlp:01 0.90:98 moreso:98 0.8:98 ------=_Part_112990_12553089.1168980532386 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I just posted a new version of ocaml+twt, a preprocessor that lets you use indentation to avoid multi-line parenthesization (like Python or Haskell). http://people.csail.mit.edu/mikelin/ocaml+twt This version introduces a major backwards-incompatible change: the eradication of "in" from let expressions, and the need to indent the let body (as suggested by the F# lightweight syntax). This reduces the familiar phenomenon of long function bodies getting progressively more indented as they go along. That is, before where you had: let x = 5 in printf "%d\n" x let y = x+1 in printf "%d\n" y You'd now just write: let x = 5 printf "%d\n" x let y = x+1 printf "%d\n" y I was hesitant to introduce this feature because it's extra hackish in implementation (even moreso than the rest of this house of cards). It also removes some programmer freedom, because you cannot have the let body on the same line as the let, and you cannot have a statement sequentially following the let, outside the scope of the binding. But after playing with it, I think it is worthwhile. Please let me know what you think. I am still not completely sure that I haven't broken something profound that will force me to totally backtrack this change, but let's give it a try. I will obviously keep the 0.8x versions around for those who prefer it and for existing code (including a lot of my own). Standard disclaimer: ocaml+twt is a flagrant, stupendous, borderline-ridiculous hack, but it works quite well, I write all my new code using it, and I recommend it if you like this style. On the other hand, if someone with more free time and knowledge of camlp4 wants to step up, I have a couple ideas about how you might do it right... Mike ------=_Part_112990_12553089.1168980532386 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
I just posted a new version of ocaml+twt, a preprocessor that lets you use indentation to avoid multi-line parenthesization (like Python or Haskell).
 
http://people.csail.mit.edu/mikelin/ocaml+twt

This version introduces a major backwards-incompatible change: the eradication of "in" from let expressions, and the need to indent the let body (as suggested by the F# lightweight syntax). This reduces the familiar phenomenon of long function bodies getting progressively more indented as they go along. That is, before where you had:
 
let x = 5 in
  printf "%d\n" x
  let y = x+1 in
    printf  "%d\n" y
 
You'd now just write:
 
let x = 5
printf "%d\n" x
let y = x+1
printf "%d\n" y

I was hesitant to introduce this feature because it's extra hackish in implementation (even moreso than the rest of this house of cards). It also removes some programmer freedom, because you cannot have the let body on the same line as the let, and you cannot have a statement sequentially following the let, outside the scope of the binding. But after playing with it, I think it is worthwhile. Please let me know what you think. I am still not completely sure that I haven't broken something profound that will force me to totally backtrack this change, but let's give it a try. I will obviously keep the  0.8x versions around for those who prefer it and for existing code (including a lot of my own).
 
Standard disclaimer: ocaml+twt is a flagrant, stupendous, borderline-ridiculous hack, but it works quite well, I write all my new code using it, and I recommend it if you like this style. On the other hand, if someone with more free time and knowledge of camlp4 wants to step up, I have a couple ideas about how you might do it right...

Mike

 
------=_Part_112990_12553089.1168980532386--