This patch for tcl8.0 makes the following code possible:

set ($this,m) x
puts $(this,m) ;# instead of $className::($this,m)

thus making the new stooop 3.0 much less verbose when accessing class
data members, and much faster too!

Since this new feature does not break anything in the Tcl core, I
think this would be a worthwhile feature to integrate into the core
(maybe in 8.1 as it is too late for 8.0).

IF YOU ARE USING STOOOP, I ENCOURAGE YOU TO WRITE TO JOHN OUSTERHOUT
ABOUT THIS. The more requests he gets, the more chance there is that
this will make it into the core. And furthermore, John is a very nice
guy and always responds to emails.

Moreover, it would add some consistency to the core:

namespace a {
    variable {}
}
set a::(x) 0
puts $a::(x)  ;# works with current tcl version
namespace a {
    set (x) 0
    puts $(x) ;# should work as line above
}

So, here is the patch:

*** tclCompile.0	Tue Aug 19 22:12:37 1997
--- tclCompile.c	Tue Aug 19 22:13:09 1997
***************
*** 3204,3210 ****
                  c = *src;
              }
  	}
! 	if (src == name) {
  	    /*
  	     * A '$' by itself, not a name reference. Push a "$" string.
  	     */
--- 3204,3210 ----
                  c = *src;
              }
  	}
!   	if ((src == name) && (*src != '(')) {
  	    /*
  	     * A '$' by itself, not a name reference. Push a "$" string.
  	     */
*** tclParse.0	Tue Aug 19 22:16:44 1997
--- tclParse.c	Tue Aug 19 22:19:40 1997
***************
*** 813,819 ****
  		string++;
  	    }
  	}
! 	if (string == name1) {
  	    if (termPtr != 0) {
  		*termPtr = string;
  	    }
--- 813,819 ----
  		string++;
  	    }
  	}
!         if ((string == name1) && (*string != '(')) {
  	    if (termPtr != 0) {
  		*termPtr = string;
  	    }
