Print

Print


And Rosta scripsit:

> > > Being a syntactician and not a programmer, I wonder why programmers
> > > don't use trees. An interface like the one used for Windows directory
> > > structure (where you click on nodes to expand and contract them) seems
> > > ideal. Surely programmers can't be guilty of a kind of cerebrally
> > > masochistic machismo?

There are code editors like that, that allow you to insert scaffolding
(an if-then-else construction, e.g.) as a single action, and then lets
you expand and contract to fill it in.  Experience shows that while such
editors are very good for examining and modifying programs locally, they
don't work well for creating programs de novo or for making substantial
modifications.  The easiest way from a well-formed syntactic form to a
different well-formed syntactic form is often through something quite
ill-formed.

In addition, one must be certain that the grammar of the tool exactly
matches the grammar of the programming language; it's hard to keep the
two in step.

> Syntacticians would never use indentation or bracketing for complex
> structures, since experience shows that they're much harder to read
> than tree notation.

But when you publish them, you probably scribble some boxes and arrows on
paper, and let the poor typesetter figure out what you meant.  Coders have
no such luxuries.

--
John Cowan  www.ccil.org/~cowan  www.reutershealth.com  [log in to unmask]
SAXParserFactory [is] a hideous, evil monstrosity of a class that should
be hung, shot, beheaded, drawn and quartered, burned at the stake,
buried in unconsecrated ground, dug up, cremated, and the ashes tossed
in the Tiber while the complete cast of Wicked sings "Ding dong, the
witch is dead."  --Elliotte Rusty Harold on xml-dev