reserved words 
Author Message
 reserved words

Well, I crossposted the discussion that was supposed to be about
how hard it is to parse languages without reserved words, but it
seems to be mostly going in a different direction.

PL/I seems to be rare (fortran being the other obvious exception)
in that it doesn't have any reserved words.  Though using language
keywords as variable names can make programs hard to read, it isn't
always true.  Having reserved words makes a language hard to
extend, as others might have used those words.

So, I would like a peaceful discussion on PL/I's no reserved words
policy, as opposed to languages like C or Java.

-- glen



Sun, 03 Jul 2005 04:39:48 GMT  
 reserved words
I don't find it a major problem to parse.  I thought there was a major
ambiguity in the statement: "DCL (a,b), ..." but then I noticed that IBM
says at least one attribute is required in a declaration.  When you hit
the comma, you know it's an assignment.  For the benefit of those who
missed the discussion in alt.folklore.computers, I completely agree with
you that a (possibly *the*) major advantage to having no reserved words
is that it is then possible to extend the language without breaking any
existing programs.  I wish I had thought to say that myself.
Quote:

> Well, I crossposted the discussion that was supposed to be about
> how hard it is to parse languages without reserved words, but it
> seems to be mostly going in a different direction.

> PL/I seems to be rare (Fortran being the other obvious exception)
> in that it doesn't have any reserved words.  Though using language
> keywords as variable names can make programs hard to read, it isn't
> always true.  Having reserved words makes a language hard to
> extend, as others might have used those words.

> So, I would like a peaceful discussion on PL/I's no reserved words
> policy, as opposed to languages like C or Java.

> -- glen



Sun, 03 Jul 2005 06:16:02 GMT  
 reserved words


Quote:
>So, I would like a peaceful discussion on PL/I's no reserved words
>policy, as opposed to languages like C or Java.

 1. I consider it to be a prudent policy, and consider languages
    with reserved words to be {*filter*}y traps.

 2. I consider it to be poor practice to knowingly use variable
    names that match keywords in the language.

--
     Shmuel (Seymour J.) Metz, SysProg and JOAT

Any unsolicited commercial junk E-mail will be subject to legal
action.  I reserve the right to publicly post or ridicule any
abusive E-mail.

I mangled my E-mail address to foil automated spammers; reply to
domain Patriot dot net user shmuel+news to contact me.  Do not



Sun, 10 Jul 2005 00:47:42 GMT  
 reserved words




Quote:


said:

> >So, I would like a peaceful discussion on PL/I's no reserved
words
> >policy, as opposed to languages like C or Java.

>  1. I consider it to be a prudent policy, and consider languages
>     with reserved words to be {*filter*}y traps.

>  2. I consider it to be poor practice to knowingly use variable
>     names that match keywords in the language.

True, but if you want descriptive variable names in a language with
a lot of keywords, you may find that all the good ones are taken.

In the Fortran 66 days, I used to use FORMAT for the name of an
array storing a variable format.  What other descriptive, six
character or less, name would you use?    I don't think I ever used
the H format descriptor, which make some of the almost ambiguous
cases.

-- glen



Sun, 10 Jul 2005 03:50:08 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Problem with reserved words in column names.

2. Reserved words in JCL

3. PB 3.5 Reserved Words List?

4. Obtaining a list of Clarion Reserved Words

5. Reserved word ?

6. CW4 - Reserved Words

7. xbase to clarion with reserved word as xbase variable

8. Reserved Words (2)

9. Reserved words

10. 359 Reserved Words and No Syntax

11. Reserved Words and Functions

12. VO2 - BEWARE Reserved words!

 

 
Powered by phpBB® Forum Software