Re: The semicolon habit (was: Q: Definition

schrod@iti.informatik.th-darmstadt.de (Joachim Schrod)
Fri, 12 May 1995 10:11:05 GMT

          From comp.compilers

Related articles
[2 earlier articles]
Re: The semicolon habit (was: Q: Definition lutz@KaPRE.COM (1995-05-09)
Re: The semicolon habit (was: Q: Definition lutz@KaPRE.COM (1995-05-11)
Re: The semicolon habit (was: Q: Definition sys3bga@doc.ntu.ac.uk (1995-05-05)
Re: The semicolon habit (was: Q: Definition stidev@gate.net (1995-05-09)
Re: The semicolon habit (was: Q: Definition plong@perf.com (1995-05-09)
Re: The semicolon habit (was: Q: Definition everettm@walters.East.Sun.COM (1995-05-11)
Re: The semicolon habit (was: Q: Definition schrod@iti.informatik.th-darmstadt.de (1995-05-12)
Re: The semicolon habit (was: Q: Definition anw@maths.nottingham.ac.uk (Dr A. N. Walker) (1995-05-16)
Re: The semicolon habit (was: Q: Definition cef@geodesic.com (Charles Fiterman) (1995-05-17)
Re: The semicolon habit (was: Q: Definition reid@HASKELL.SYSTEMSZ.CS.YALE.EDU (1995-05-16)
Re: The semicolon habit (was: Q: Definition jan@neuroinformatik.ruhr-uni-bochum.de (1995-06-24)
Re: The semicolon habit (was: Q: Definition tim@handel.Princeton.EDU (1995-06-24)
Re: The semicolon habit (was: Q: Definition bevan@cs.man.ac.uk (1995-06-30)
[5 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers
From: schrod@iti.informatik.th-darmstadt.de (Joachim Schrod)
Keywords: syntax, design
Organization: TH Darmstadt, FG Systemprogrammierung
References: 95-04-193 95-05-066
Date: Fri, 12 May 1995 10:11:05 GMT

> lutz@KaPRE.COM writes:
> >schrod@iti.informatik.th-darmstadt.de (Joachim Schrod) writes:
> >> [indentation syntax makes it hard to generate programs]
> >
> >Could you provide some more details? I've heard this argument
> >before, but it's not clear to me that it would be any harder to
> >generate N tabs than to generate block delimeters correctly. How
> >hard is it to keep a global tab counter?


plong@perf.com (Paul Long) writes:
> I assume he means that generating proper indention is not as easy as
> generating a basically unindented program but with proper syntax.


No, I think I wrote what I mean; it was in the deleted part.


It's convenient to use refinements when one generates programs.
(There exist processors for them.) While generating one does not
necessarily know the current lexical level. I don't think one should
be forced to track it if not necessary, just because the language
designer thought one *must* indent properly. OTOH, I'll virtually
shoot any programmer working for me who does not indent properly.


Another example is the run-time generation of programs as strings
that are evaluated later. It's more convenient to create a Lisp-like
(i.e., fully parenthesized) structure -- and I think convenience is a
very important point in language usage. It allows the programmer to
focus on the problem at hand, not at the language quirks. (I'm not a
friend of C and C++, can you tell? :-)


Or take as an example the generation of Makefiles. Here you have a
language format where indentation and empty lines are important. (Even
tabs are important.) Again one has to pay lots of attention in getting
the quirks right, time that would be better spent working on
solutions to the real problem...


Hope I expressed myself clearer this time,


Joachim




PS: Please don't tell me one should use other target languages & CM
tools. Technical matters are only one (and most often minor) point in
the selection of languages & tools for a project.


--
Joachim Schrod Email: schrod@iti.informatik.th-darmstadt.de
Computer Science Department
Technical University of Darmstadt, Germany
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.