Re: Compiler/Language eXperiment

Tomek Zielonka <t.zielonka@students.mimuw.edu.pl>
24 Jan 2002 14:49:39 -0500

          From comp.compilers

Related articles
Compiler/Language eXperiment axel@dtone.org (Axel Kittenberger) (2001-11-29)
Re: Compiler/Language eXperiment t.zielonka@students.mimuw.edu.pl (Tomek Zielonka) (2002-01-24)
Re: Compiler/Language eXperiment hannah@schlund.de (2002-01-28)
Re: Compiler/Language eXperiment toon@moene.indiv.nluug.nl (Toon Moene) (2002-01-28)
Re: Compiler/Language eXperiment toon@moene.indiv.nluug.nl (Toon Moene) (2002-01-30)
Re: Compiler/Language eXperiment rickh@capaccess.org (2002-01-30)
Re: extensible languages, was Compiler/Language eXperiment bear@sonic.net (Ray Dillinger) (2002-01-30)
| List of all articles for this month |

From: Tomek Zielonka <t.zielonka@students.mimuw.edu.pl>
Newsgroups: comp.compilers
Date: 24 Jan 2002 14:49:39 -0500
Organization: MIMUW
References: 01-11-135
Keywords: design, comment
Posted-Date: 24 Jan 2002 14:49:39 EST

Axel Kittenberger napisał:
> Think about the way we're used to programming, we write text files in a
> text editor having a specific command structure in mind. After writing the
> text a parser has to seek out that structure again. When we're talking
> about language or project coding-style we're often only discussing how this
> text files should look like, if the indention of blocks should be 2,
> 4 or 8 characters or tabs, if the blocks should be marked with curly
> brackets or with the BEGIN/END keywords, if the leading bracket should be
> in the same line or in the next, and on and on. But after all that does
> really not matter, or? We all have the same symantical block in mind, no
> matter how it's representation looks like. [...]
>
> Altough the representation does no longer matter, there has to be a
> structure in the language. In example one cannot exchange C and PASCAL
> freely. They've also semantical differences. So to speak tech jargon, the
> syntactic is free, but the symantic has to be defined. As point of origin I
> would take java, maybe with some extentions to it to be able to compete
> with C(++) on it's homeland, like adress-of and content-of operators,
> functions pointers, and beeing able to directly interact with existing C
> libraries.


Take a look at OCaml. It has a tool called camlp4, using which you can
write different parts of a project with different syntaxes. You can
also write your on syntaxes (parsers) or extend existing ones.


Presently I can write my code using one of implemented syntaxes: OCaml
(with several extensions), OCaml revised (with extensions), Standard
ML, Lisp.


Individual developers can and do write their own syntax extensions,
making OCaml more friendly (for them).


And the language itself is so powerfull and elegant!


Tom
[Back in the 1970s, languages with extensible syntax led to write-only
code with no two programs using the same syntax. Have they solved that
problem? -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.