List Info

Thread: Re: Re Learning camlp4




Re: Re Learning camlp4
country flaguser name
United States
2007-05-21 04:28:29


On May 21, 2007, at 9:58 AM, dmitry grebeniuk wrote:

> Although original syntax allows to write code with
>; less "punctuation" symbols and the code looks nicer,
> revised syntax targets at code safety.

"The revised syntax is an alternative syntax for OCaml. Its purposes
are 1/ fix some problems of the normal syntax (unclosed constructions
sometimes introducing ambiguities, constructors arity, end of top
level phrases and structure items, etc) 2/ avoid unjustified double
constructions (":=&quot; vs ``<-'', ``fun'' vs ``function'',
``begin..end'' vs parentheses) or concepts (types and types
declarations) 3/ bring some ideas (lists, types). In a word, propose
a syntax which be more logical, simpler, more consistent and easier
to parse and to pretty print.&quot;

I see nothing about safety here and I haven't encountered any
problems with the old syntax so far.

Thanks, Joel

--
http://wagerlabs.com/

__._,_.___
.

__,_._,___
Re: "ocaml_beginners"::[] Learning camlp4
country flaguser name
United States
2007-05-21 04:58:30

--- In ocaml_beginners%40yahoogroups.com">ocaml_beginnersyahoogroups.com, Joel Reymont <joelr1...> wrote:
&gt;
>
> On May 21, 2007, at 9:58 AM, dmitry grebeniuk wrote:
&gt;
> > Although original syntax allows to write code with
>; > less "punctuation&quot; symbols and the code looks nicer,
&gt; > revised syntax targets at code safety.
>
> "The revised syntax is an alternative syntax for OCaml. Its purposes
> are 1/ fix some problems of the normal syntax (unclosed constructions
> sometimes introducing ambiguities, constructors arity, end of top
> level phrases and structure items, etc) 2/ avoid unjustified double
> constructions (":=&quot; vs ``<-'', ``fun'' vs ``function'',
> ``begin..end'' vs parentheses) or concepts (types and types
> declarations) 3/ bring some ideas (lists, types). In a word, propose
> a syntax which be more logical, simpler, more consistent and easier
> to parse and to pretty print.&quot;
>
> I see nothing about safety here and I haven't encountered any
> problems with the old syntax so far.

After having read carefuly
http://caml.inria.fr/pub/docs/tutorial-camlp4/tutorial005.html
it seems to me that what dmitry calls "safety" is mainly about
eliminating ambiguities. At least, that's why I understand and agree
with (now .

The idea is that there is no ambiguity in what you write,
-> therefore more chances that what the compiler understand is what
you really meant,
-> therefore more chances that "if it compiles it works";,
-> therefore it is more safe.

Don't you agree ?

Vincent

__._,_.___
.

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

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