« November 2009
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
     
       
Today
XML

Blog::Navigation

GetJava Download Button
Get the Source
Personal Blog

Blog::Referers

Today's Page Hits: 925

Powered by Roller Weblogger.
« JSR-223 script engin... | Main | A convention for... »
20061012 Thursday October 12, 2006

No reserved words!

Came across Rémi Forax's blog entry titled Languages Evolution: introduction of new keywords. He proposes the idea of contextual keywords. i.e., keywords can be used as identifier in other places - which helps in introducing new keywords in a mature language - without breaking existing programs. I've renamed "enum" during JDK 5.0. I've seen others renaming of "assert" during 1.4. So, how about avoiding renaming - but, still have new (context sensitive) keywords....

Now, that reminds me of PL/I - no reserved words! PL/I's "keywords" are recognized only in context, and may otherwise be used as identifier elsewhere. I've never programmed in PL/I. My friend (who used to be a mainframe programmer) used to "scare" us by showing programs such as this one.

Interestingly, Smalltalk does not have reserved words at all. Sometimes it is said that Smalltalk has only 5 reserved words:

  1. nil (null)
  2. true
  3. false
  4. self (this)
  5. super
But, it is possible to create methods even with these names!



( Oct 12 2006, 07:53:20 PM IST ) Permalink del.icio.us | furl | simpy | slashdot | technorati | digg

Comments:

Post a Comment:

Comments are closed for this entry.
Copyright (C) 2005, A. Sundararajan's Weblog