scope Tyler Close (tyler@lfw.org)
Wed, 04 Nov 1998 02:58:46 -0800

[I'm resending Tyler's message with the brace-style fixed. I'll then reply to the fixed version. --MarkM]

Still trying to get my mind around the grammar and thought of something that may already be implied by the grammar or may be a new idea, I'm not sure which.

If you have something like:

to foo(arg1, arg2) {

scope
}

It seems to me that the above code actually instantiates a new object of type foo with private data members arg1, arg2 and no methods.

Therefore, if you had something like:

to foo(arg1, arg2) {

	to bar(arg) {
		# bar this foo
	}
	scope

}

I think this would instantiate a new object of type foo with private data members arg1, arg2 and public method bar(arg).

Further, if you had:

to foo(arg1, arg2){

	to bar(arg) {
		# bar this foo
	}
	buffer = { 0 ... 8 }
	scope

}

I think this would instantiate a new object of type foo with private data members arg1, arg2, buffer and public method bar(arg); where arg1 and arg2 are persistent members and buffer is transient.

Further again:

to foo(arg1, arg2) {

	to bar(arg) {
		# bar this foo
	}

	to face() {
		to baz(arg) {
			# baz this foo
			...
			bar(arg)
			...
		}
		scope
	}
	buffer = { 0 ... 8 }
	face()

}

I think this would instantiate a new object of type face with private data members arg1, arg2, buffer and private method bar(arg) and public method baz(arg); where arg1 and arg2 are persistent members and buffer is transient.

Well, that's as far as I've taken it so far. I think this is pretty cool. Is this what scope is for?

Tyler