List Info

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




Re: "ocaml_beginners"::[] Learning camlp4
country flaguser name
United Kingdom
2007-05-22 06:55:43

On Tue, May 22, 2007 at 11:38:40AM +0300, dmitry grebeniuk wrote:
> But hadn't you wrote syntax extensions to ocaml? They turn
>; ocaml into some other language, which should be learned too.

Yes, but hopefully they only extend the language, rather than changing
it fundamentally. The only significant extension I've written is
PG'OCaml, which just adds a single operator to the language. The
average programmer wouldn't even understand why the "PGSQL" operator
isn't a normal function -- it would look the same to him.

A more invasive change is micmatch, but even there the main
modification is just the addition of a single operator ("RE").
(Well, there are a couple of others, but that's the main one).

Unless you're going to argue that libraries are a bad thing, because
they also change the language ...

Rich.

--
Richard Jones
Red Hat

__._,_.___
.

__,_._,___
Re Learning camlp4
country flaguser name
Moldova, Republic of
2007-05-22 08:08:05

Shalom, Richard.

>>; But hadn't you wrote syntax extensions to ocaml? They turn
>> ocaml into some other language, which should be learned too.

RJ> The only significant extension I've written is PG'OCaml,
RJ> which just adds a single operator to the language.

RJ> A more invasive change is micmatch, but even there the
RJ> main modification is just the addition of a single
RJ> operator ("RE"). (Well, there are a couple of others,
RJ> but that's the main one).

Anyway, extensions change the syntax, and in most of cases
it's possible to find situations where
expression-with-operator can't be used absolutely
identically as expression of core language.
Even if PG'OCaml and micmatch don't change too much, there
are extensions that change more than one operator. Does it
mean that caml4 is evil because it changes the language?

RJ> Unless you're going to argue that libraries are a bad
RJ> thing, because they also change the language ...

Libraries don't change the language (except presumably Obj
and similar). There is a strict border between things that
change the language and things that do not.

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

__._,_.___
.

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

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