From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 893F5BC57 for ; Fri, 24 Sep 2010 09:48:40 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkQCAI/0m0zRVda2imdsb2JhbACiMAgVAQELCQwHDwUfqVOLUYZLiQMBAQMFhT0EijiFYIMj X-IronPort-AV: E=Sophos;i="4.57,228,1283724000"; d="scan'208";a="71333481" Received: from mail-iw0-f182.google.com ([209.85.214.182]) by mail4-smtp-sop.national.inria.fr with ESMTP; 24 Sep 2010 09:48:39 +0200 Received: by iwn34 with SMTP id 34so3282202iwn.27 for ; Fri, 24 Sep 2010 00:48:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type; bh=2G9xEQ1iK6oMV1KCIIRM5F5LEDAkXndfgs3xYTCmO20=; b=sFd5je9aI5HGzamRdU67h3HQutASvXczdImRVuvtQ10U9++sUKJVa44qWFOwsdQWjA M3JQ7y+KWyFfjotVIQUHhLS3K3EEB4wjZOJyAMJZd+fO9iAarLMJveKksPCkdfLUx0Dk H6uJM5lbjyKGSxBNK0rL45ZEcxFX9+ri/5Xq4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=jMKeEvgAYtNHT4WsYZsSAerh2f8bjPYoC2Xt4tQPPK1lFpgiiLAAfhVIvcrTnOCjVM JwaW7D1olUV6PNhHp/DS7adF6oPCv8t7EbanJ6Q7+m958p32OxclL9IBZeniP02CTg6N /wIizLKHGLbI4sewxUoqcq4U9S2/17uhDbux0= Received: by 10.231.193.11 with SMTP id ds11mr1969447ibb.192.1285314518649; Fri, 24 Sep 2010 00:48:38 -0700 (PDT) MIME-Version: 1.0 Sender: david.mentre@gmail.com Received: by 10.231.37.69 with HTTP; Fri, 24 Sep 2010 00:48:08 -0700 (PDT) In-Reply-To: References: From: David MENTRE Date: Fri, 24 Sep 2010 09:48:08 +0200 X-Google-Sender-Auth: M2YMvhRBxjnXY9y9yQv5l_E_mqM Message-ID: Subject: Re: [Caml-list] what do I need to know to understand camlp4 To: ben kuin Cc: caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 X-Spam: no; 0.00; camlp:01 inherently:01 syntax:01 cpp:01 syntax:01 ocaml:01 runtime:01 ocaml:01 bug:01 inference:01 compilation:01 ocaml's:01 hammer:98 garbage:01 caml-list:01 Hello, 2010/9/23 ben kuin : > So why does the whole world tries to hammer some functional features > into his imperative language? Why not maximize the imperative features > of a functional language? Because some algorithms or way to solve problems (think pattern matching) are inherently better expressed using a functional approach than an imperative one, and vice versa for others. > For me it's worse, the syntax doesn't look quirky, but rather random > too me. It's not like cpp where the syntax is utterly pragmatic, > without any aesthetic claim. In OCaml it feels like someone > deliberately neglected the syntax. I would say: go beyond syntax ben! :-) This is not very important. What is important are the concepts behind the syntax and the way to use them to improve your programs (like phantom types to add static checks without any runtime penalty to give just one example). For me, OCaml is probably one of the best language if you need to maintain a bug free program over a long period: type inference and efficient garbage collector to program efficiently and safely at the same time, compilation to native code to have good to very good performance, a very active community and a lot of libraries, etc. I don't like OCaml's syntax, but this is the way it is. :-) And if you don't like it, just use another language that better fits your feeling. But for me you'll make a mistake if you not try to grasp the OCaml Way of Doing Things(tm). ;-) Sincerely yours, david