[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bison function argument style

From: Hans Aberg
Subject: Re: Bison function argument style
Date: Tue, 19 Nov 2002 11:23:28 +0100

At 18:16 -0800 2002/11/18, Paul Hilfinger wrote:
>I wasn't justifying the practice, merely explaining it.  The claim
>made in the Coding Standards document was that programs are easier to
>read with the space.  You can judge for yourself whether that it true.

The claim in the Coding standard is false. -- There are some beliefs that
some notations are easier to read than others, but I think there are some
investigations show that much in reality much hinges on what one is used

My own opinion about the extra space is that it looks wrong, because it
contradicts what typically is used in math.

>The problem with using typeset math as a guide is that typesetters of
>mathematical text do not generally use fixed-width roman text,

Another funny thing with computer code is that older books often use
variable width fonts. Somehow monospace became popular, and this even
slipped in as an error in Unicode in the form of a "mathematical semantic
monospace" type. (It can't be deleted, as nothing ever gets deleted in

>relatively few mathematical functions take more than one argument
>(compared to programs),

No, this has nothing to do with it: Multiple arguments are common in math.

> and vanishingly few function applications
>spread over more than one line in mathematical text.

You have never seen any more complicated math formulas then? :-)

-- In fact the amstex package, now a part of LaTeX, has several options
that allows one to break formulas over several lines. Then the formulas are
typeset as on one line, except that the different lines may have certain

>  In other words,
>it's not immediately obvious that the two contexts are quite as
>analogous as you'd like for making your particular argument.

I think that one reason might be that LISP like languages insert an extra
space because they have to in order to separate identifiers. But in math,
even in Church's "The Calculi of Lambda Conversion" he does not use any
such extra space.

My own little investigations of typical math syntaxes suggest that they are
a great deal more sophisticated than what one has bothered to use in
computer languages. It is possible to do computer language syntaxes that
are much better by comparing to math syntax usage.

  Hans Aberg

reply via email to

[Prev in Thread] Current Thread [Next in Thread]