Re: About those parenthesis....



"Kaz Kylheku" <kkylheku@xxxxxxxxx> writes:

>> I like parenthesis and prefix from beginning. However, I think
>> that usual f(x,y,z) would be better choice than (f x y z).
>
> The commas don't serve any purpose, other than to add clutter.
> So a better notation than f(x, y, z) is quite simply f(x y z).

The commas do serve a purpose: they avoid extra parens if arguments
are not self-delimiting, as in f(x - 1, x + 1).

> I have programmed with Lisp-like semantics using the f(x,y,z) syntax.
> It's ugly. The comas really are a problem.

Indeed they are quite ugly if the f(x,y,z) syntax is used for all
syntactic constructs.

> The f(x y z) notation is also very poor when it comes to subexpressions
> which do not represent an operation f being applied to arguments x y z.

Of course nobody in the right mind would use f(x y z) or f(x,y,z)
to denote a four-element list.

But it doesn't matter, unless you take for granted that function
application must be represented by a list consisting of the function
name followed by the arguments.

> Even when the first symbol /is/ an operator, it's not more important
> than the other two symbols.

I disagree. It's treated so much differently from the arguments
(especially in Lisp where it's not interpreted as an expression)
that this is not a valid reason for making it look like one of the
arguments. There might be other reasons, but this argument is flawed.

--
__("< Marcin Kowalczyk
\__/ qrczak@xxxxxxxxxx
^^ http://qrnik.knm.org.pl/~qrczak/
.



Relevant Pages

  • Re: Program compression
    ... means using tools (such as parse-tree rewrite rules or syntax ... enough keyword and/or syntax to trigger expansion back to the full ... let's say you have a text string which contains the notation ... favorite notation for nested lists is, ...
    (comp.programming)
  • Re: PHP global namespace clogged up
    ... >> the OO side of PHP for many months after I first started learning it. ... >> notation may strenghten one of PHP's weaknesses, ... > to climb - one for the procedural syntax and one for the OO syntax. ...
    (comp.lang.php)
  • Re: First class types and their representation
    ... It makes sense to use a common representation ... now, the notation is a little hairy, but it is possible to map much of a C ... however "i" is regarded as a single element terminating after the the ... types, but thus far this has not been needed (if I were to add a syntax, I ...
    (comp.lang.misc)
  • Re: modifying array access syntax
    ... What I had in mind is something that resembles standard notation for the field in question, ... Recall that for beginners in mathematics, the notations typically used in mathematics are by far not obvious. ... So I think the basic tradeoff is as follows: If your interest is to develop the code for your own experiments, it's probably more effective to invest some time into learning the Lisp syntax in order to forget about syntactic issues altogether in the long run. ...
    (comp.lang.lisp)
  • Re: PHP global namespace clogged up
    ... > success is based on it's easy accessibility. ... > notation may strenghten one of PHP's weaknesses, ... > compulsory OO notation will undermine it's fundamental strength of easy ... to climb - one for the procedural syntax and one for the OO syntax. ...
    (comp.lang.php)