[E-Lang] Syntax Reductions: Consensus so far

Tyler Close tclose@oilspace.com
Tue, 6 Mar 2001 09:57:22 -0000


MarcS wrote:
> If we come up with an entirely different word for the
> function keyword, I'm
> not even sure that that is a win, because people are going to pass
> "functions" around in live code as objects. There are even
> 2 examples in the
> book that do this (though I have tried to constrain this
> usage in the book
> :-)

Keep in mind that in the new EiaW you will not be defining objects
with the "def" keyword, you will always be using the "class" keyword.
Surely you do not propose to also define your functions using the
"class" keyword? If not, then I don't see why readers should see
functions as less object-like when using "to" as opposed to "def".

Also, consider this class.

class ThingMaker() :any {

	# This is a private method.
	to bar() { ... }

	def Thing() {

		# This is a public method.
		to foo() { ... }
	}
}

You are now programming as a class programmer. Think like a class
programmer. The above class makes sense to the class programmer in me
that I once knew.

Tyler