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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 7A53BBC57 for ; Thu, 23 Sep 2010 21:50:35 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjkBANpLm0zRVaG2kGdsb2JhbACiKwgVAQEBAQkJDAcRAx+sPok9ghSGcy6IVQEBAwWFPQSKOA X-IronPort-AV: E=Sophos;i="4.57,225,1283724000"; d="scan'208";a="72837642" Received: from mail-gx0-f182.google.com ([209.85.161.182]) by mail1-smtp-roc.national.inria.fr with ESMTP; 23 Sep 2010 21:50:34 +0200 Received: by gxk8 with SMTP id 8so999268gxk.27 for ; Thu, 23 Sep 2010 12:50:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=568mIPNIwZQZGfmxC67Pca2B5VHuoqeaLloe9s4s9js=; b=luZqf5OuQFzDxi8zGzi9egjDsrNz+/nBDsmLGFlBqC3EhMcnGdRSeeNgyP7l6DtFM1 VaoJJNj2ZC/FMXGUJp/uOsTW3SHKP48tOgj/T0mvRHfO5TtWKCTKrjL5nlmm5kWm7nsy UWc4DIr5+srrWFf3kMKT+zmOD03hi39ccBdFc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=vOPBW2yCoyeHoGTEId3weII9X/JurrOVKPxzBW7Knh+OdlkJJntOpVSBdV0AoPKRmT hQbpif95T/ff8ScRUxHiSE5Tv6REhyRY9jJfRuuma33LLvUZp24PMUgi7wBXZv5AFYFq Ss+uiWU3OJhJxWpIf3hfBlZ9FIaFsT9joMzbk= MIME-Version: 1.0 Received: by 10.100.254.15 with SMTP id b15mr2603612ani.99.1285271434215; Thu, 23 Sep 2010 12:50:34 -0700 (PDT) Received: by 10.231.212.216 with HTTP; Thu, 23 Sep 2010 12:50:34 -0700 (PDT) In-Reply-To: References: Date: Thu, 23 Sep 2010 21:50:34 +0200 Message-ID: Subject: Re: [Caml-list] what do I need to know to understand camlp4 From: ben kuin To: David MENTRE , caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 X-Spam: no; 0.00; camlp:01 ocaml:01 ocaml:01 'problem':01 explicitely:01 syntax:01 syntax:01 cpp:01 notation:01 hammer:98 caml-list:01 functions:01 imperative:01 imperative:01 functional:02 > If you are new to OCaml, I'm not actually new to OCaml, but although I've read every notable book about OCaml and a lot of good code of other OCaml programs, OCaml is still very foreign and counter-intuitive too me. I know what you're might thinking now: why the hell does he still bother? The 'problem' is that every time I read something in Python or worse in Java/C++ I instantly miss the lightweight types/pattern matching facility the ability to easily pass functions around. Then I read functional Ruby or Scala code, and I begin to hate fp because in these context it only makes the code harder to read. 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? I know only one big project where the explicitely use an imperative style in ocaml? But this code looks (syntax wise) still too much functional for my taste. > with its syntax (somewhat quirky[1], I admit). 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. > [1] Compared to other programming languages. I know the syntax is > the way it is for precise reasons (currying, closer to mathematical > notation, ...). Would you mind to list a few mathematical subjects that help me to understand OCamls syntax? thanks a lot ben