23 Dec 2003 00:21:28 -0500

Related articles |
---|

Layout syntax haberg@matematik.su.se (2003-12-03) |

Re: Layout syntax joachim.durchholz@web.de (Joachim Durchholz) (2003-12-08) |

Re: Layout syntax haberg@matematik.su.se (2003-12-13) |

Re: Layout syntax cdc@maxnet.co.nz (Carl Cerecke) (2003-12-13) |

Re: Layout syntax joachim.durchholz@web.de (Joachim Durchholz) (2003-12-14) |

Re: Layout syntax haberg@matematik.su.se (2003-12-20) |

Re: Layout syntax joachim.durchholz@web.de (Joachim Durchholz) (2003-12-21) |

Re: Layout syntax haberg@matematik.su.se (2003-12-23) |

Re: Layout syntax joachim.durchholz@web.de (Joachim Durchholz) (2003-12-27) |

Re: Layout syntax haberg@matematik.su.se (2004-01-02) |

Re: Layout syntax joachim.durchholz@web.de (Joachim Durchholz) (2004-01-07) |

Re: Layout syntax haberg@matematik.su.se (2004-01-09) |

Re: Layout syntax joachim.durchholz@web.de (Joachim Durchholz) (2004-01-12) |

Re: Layout syntax haberg@matematik.su.se (2004-01-16) |

[6 later articles] |

From: | haberg@matematik.su.se (Hans Aberg) |

Newsgroups: | comp.compilers |

Date: | 23 Dec 2003 00:21:28 -0500 |

Organization: | Mathematics |

References: | 03-12-016 03-12-060 03-12-081 03-12-104 03-12-112 03-12-124 |

Keywords: | syntax |

Posted-Date: | 23 Dec 2003 00:21:28 EST |

<joachim.durchholz@web.de> wrote:

*>In other words, mathematical objects are deeply nested, but*

*>mathematical formulae usually aren't. Actually, I'm hard pressed to*

*>remember having ever seen a mathematical formula that had more than*

*>three nesting levels.*

Yes, this is what seems to happen: Mathematicians use a lot of

unnesting techniques, making the math nesting depth fairly flat. This

probably happens because it is written for human to parse. In fact,

when learning to write math papers, one also has to learn how to

unnest the math.

The question is what happens when math is written proof verification

system, as the computer can easily check any nesting: then manual

unnesting will no longer needed. So one will probably see more of such

nesting then.

I certainly admit nesting in my proof verification system: It is

declarative, and one can have local variables, just as in say C/C++

and most other modern declarative languages.

*>That's exactly my point: mathematical syntax, designed for consumption*

*>by humans, isn't easily transferable to computer language syntax,*

*>designed for consumption by computers. In other words, drawing*

*>syntactical inspiration from actual mathematical usage may be helpful,*

*>but sooner or later one is going to run into trouble.*

My development strategy is to wrestle a bit with the more common

popular syntactic features, such as sets, function definitions and the

like, to make them close to actual mathematical usage. Then, if I get

so far, added user math should use a less complicated syntax, perhaps

defined by some operator precedence.

*> Which is just my point: mathematics isn't the best source of*

*>inspiration when it comes to syntax. (It's an excellent source of*

*>inspiration when considering semantics! At least if a precise*

*>semantics is desired.)*

Quite on the contrary: Just because of these difficulties, math

becomes an important source if inspiration, because these apparent

syntactic quirks are in reality there so as to produce a syntax that

is efficient to humans. So, as computer languages can, in view of

better computers, become more adapted to humans, it is important to

have this input.

Hans Aberg

Post a followup to this message

Return to the
comp.compilers page.

Search the
comp.compilers archives again.