List Info

Thread: Re: "ocaml_beginners"::[] Learning camlp4




Re: "ocaml_beginners"::[] Learning camlp4
country flaguser name
United States
2007-05-21 04:26:30

Hello dmitry,

--- In ocaml_beginners%40yahoogroups.com">ocaml_beginnersyahoogroups.com, dmitry grebeniuk <gds-mlsts...> wrote:
&gt;
> Shalom, vincent.aravantinos.
>
> >> Why don't you like revised syntax? Just because you have
>; >> wrote too many lines of code in original syntax and don't
&gt; >> want to learn another syntax?
>
> va> Personaly, this is completely the case and it is a
> va> very good reason.
>
> Is such inertia is so good? Revised syntax has many
>; advantages over original one, and when I see people keep
>; using original syntax and dislike revised syntax, it reminds
> me how imperative/OO programmers hold their C/C++/Java and
> can't even think of more appealing alternatives.

Ok, I wrote my previous message a bit quickly. I am not for "inertia"
of course, I am a vim user and a latex user, so I am pretty convinced
about making an effort to learn something if I believe it will be payful
in a long term.

The fact is that I am just not convinced with the revised syntax :
I like the "do&quot; thing but hate the "bracketed match";s, ... As usual it's
a matter of taste.

Hence the fact that this syntax is not mandatory for all caml users but
_is_ mandatory for camlp4 users is pretty ugly from a "commercial";
point of view...

But your insistance about revised syntax made me take a further
glance at it, and I will immediatly take a further look at those
&quot;safety&quot; arguments.

> (...)
&gt; va> By the way, looking at the main list I understood that
>; va> camlp4r was for using the revised syntax and camlp4o for
> va> using the original one, am I wrong ?
>
> You are right. I use "-pp camlp4r&quot; for compiling sources
> written in revised syntax.

So -- coming back to the original issue -- the problem about
camlp4&#43;revised is indeed resolved in the new camlp4 ?

Thank you,
Vincent

__._,_.___
.

__,_._,___
Re Learning camlp4
country flaguser name
Moldova, Republic of
2007-05-21 05:53:55

Shalom, Vincent.

VA> Ok, I wrote my previous message a bit quickly. I am not
VA&gt; for "inertia" of course, I am a vim user and a latex
VA> user, so I am pretty convinced about making an effort to
VA>; learn something if I believe it will be payful in a long
VA&gt; term.

Nice to hear it.

VA> Hence the fact that this syntax is not mandatory for all
VA&gt; caml users but _is_ mandatory for camlp4 users is pretty
VA> ugly from a "commercial"; point of view...

VA> So -- coming back to the original issue -- the problem about
VA> camlp4+;revised is indeed resolved in the new camlp4 ?

It was really ugly, but now it's resolved. New camlp4
allows to use original syntax. For example, looking at
message from caml-list:

============================================================
From: Nicolas Pouillard
Date: Mon, 21 May 2007 11:26:21 +0200

[..skip..]

open Camlp4.PreCast;;
open Syntax;;
EXTEND Gram
expr: LEVEL "top&quot; [
[ "PGSQL"; "(&quot;; dbh = expr; ")&quot;; extras = LIST1 STRING ->
let query, flags =
match List.rev extras with
| [] -> assert false
| query :: flags -> query, flags in
pgsql_expand ~flags loc dbh (Camlp4.Struct.Token.Eval.string query)
]
];
END

[..skip..]
============================================================

It's definitely an original syntax.

--
WBR,
dmitry mailto: gds-mlsts%40moldavcable.com">gds-mlstsmoldavcable.com

__._,_.___
.

__,_._,___
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )