Re: 4GL language design, was Writing a recursive descent parser in C

Peter <pcc@ecet.vtc.edu>
29 Dec 2001 13:22:24 -0500

          From comp.compilers

Related articles
Writing a recursive descent parser in C bilbo@volcanomail.com (2001-11-29)
Re: Writing a recursive descent parser in C spinoza1111@yahoo.com (2001-12-03)
Re: Writing a recursive descent parser in C lingolanguage@hotmail.com (Bill Rayer) (2001-12-07)
Re: 4GL language design, was Writing a recursive descent parser in C spinoza1111@yahoo.com (2001-12-09)
Re: 4GL language design, was Writing a recursive descent parser in C alexc@world.std.com (2001-12-11)
Re: 4GL language design, was Writing a recursive descent parser in david.thompson1@worldnet.att.net (David Thompson) (2001-12-27)
Re: 4GL language design, was Writing a recursive descent parser in C pcc@ecet.vtc.edu (Peter) (2001-12-29)
Re: 4GL language design, was Writing a recursive descent parser in C rajat@austin.rr.com (Rajat Datta) (2001-12-29)
| List of all articles for this month |

From: Peter <pcc@ecet.vtc.edu>
Newsgroups: comp.compilers
Date: 29 Dec 2001 13:22:24 -0500
Organization: WebUseNet Corp. - "ReInventing The UseNet"
References: 01-11-146 01-12-008 01-12-020 01-12-040 01-12-046 01-12-160
Keywords: syntax
Posted-Date: 29 Dec 2001 13:22:24 EST

david.thompson1@worldnet.att.net says...
> Alex Colvin <alexc@world.std.com> wrote :
> ....
> > Then there was OCCAM, where indentation determines block
> > structure. I've never haad a chance to try this, and I'm not sure how
> > to implement it, but it looks like a nice idea. In most cases the
> > programmer indents, but the compiler ignores it and uses other
> > signs. Inevitably, the programmer and the compiler disagree.
> >
> I have heard Python also does this.


Python does indeed do that. I think it's one of Python's best
features. As an instructor of programming I find that it's like
pulling teeth to get my students to indent their code sensibly (I'm
not sure why this is). With a language that uses indentation to
control the block structure the students would *have* to indent
consistently or the program just wouldn't work. I like that. :-)


I'm not sure how Python handles tab characters. I could imagine a
student using a mixture of tabs and spaces to do an indentation such
that it looks like the same indentation as the previous line but
isn't. That would be a hard to find bug, I should think.


Peter


Post a followup to this message

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