Meaningful TABs in Python is a brilliant language
innovation.  Python syntax is essentially what lisp's
should be.  If you indent lisp in the only standard
readable way, and then take out the parentheses, you
essentially have python-looking code.  It is a massive
productivity boost when editing code that isn't
behaving exactly as you hoped to not have to cursor
from bracket to bracket, removing and adding some,
much less (and more importantly) not having to count
whether you have correctly matched 6+ closing
brackets.

What makes lisp such a poor design, is that
programmers maintain 2 redundant syntax formattings. 
Once with tabs, producing python looking code for
readability, and a duplicate parentheses for the
compiler.

Of the 9 cases you listed, only 
a+b+ c and a+b + c would have a different parsing than
the J default: (a+b) + c

The big benefits come with J sentences like:
+/ ((((4-3)*(4-2))+4)-1),1,((6-4)*2)
10
could be written instead as:
+/ 4-3 *4-2 +4 -1 ,1, 6-4 *2
If it turns out, what you really meant to write was:
+/ ((((4-3)* 4))-2+4)-1),((6-4)*2+1)
then it is much easier to edit the new syntax to:
+/ 4-3 *4 -2+4 -1 , 6-4 *2+1
editing the original sentence requires doing a sanity
check on most of the parens to make sure they reflect
your intent. and in fact my edited original sentence
has a syntax error .  What I meant to edit it to:
+/ (((((4-3)* 4))-2+4)-1),((6-4)*2)
1

I'm not making a J specific criticism with the new
syntax.  In every language, parsing a lot of parens is
very slow and unintuitive.  I think its natural to try
and use spaces as a sanity check to group terms the
way you intended so that you can fix the parens later
if the compiler doesn't understand your intent (and
you forget your intent).  

The same way that Python "fixed" lisp by removing
redundant parens formatting (fixed defined as
overwhelming market acceptance of Python over Lisp
despite a performance and feature deficit), I think
the syntax change is easy enough to parse by an
interpreter, and much easier to read and write by
programmers.

In another message, I think Bill mentioned there could
be html pasting problems with the new syntax.  I'm
sure thats not the case.  double spaces don't have any
different meaning that a single space.

--- Randy MacDonald <[EMAIL PROTECTED]> wrote:

> 1) I'm not sure I would welcome the need to tell the
> difference between:
>    a+b+c
>    a+b+ c
>    a+b +c
>    a+b + c
>    a+ b+c
>    a+ b+ c
>    a+ b +c
>    a+ b + c
>    a +b+c
>    ... and 9 more possibilities.
> -----------------------------------------------------

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to