« October 2006 »
SunMonTueWedThuFriSat
1
2
5
8
10
13
14
15
17
19
20
21
23
25
27
29
    
       
Today
XML

Blog::Navigation

GetJava Download Button
Get the Source
Personal Blog

Blog::Referers

Today's Page Hits: 1005

Powered by Roller Weblogger.
« Previous day (Oct 10, 2006) | Main | Next day (Oct 12, 2006) »
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

Copyright (C) 2005, A. Sundararajan's Weblog