Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

The Java VM is still the right target but might be fun to start out having an interpreter written in Java.

Hmm...what would it look like?

Code Block
Animal subclass: Dog
	const int w = 3.
	String name = 'Rex'.
	float weight = 0.0.

	speak = [ sys println: 'woof' ]
	feed: int food = [ weight += food * w ]
	walk: Point to from: Point here = [
		...
	]
	float howMuchFood = [ ^weight / w ]
	boolean equals: other = [ ^self name == other name ]

...

'=' not ':='
hmm...maybe it's ok to have keywords for var, method, types. Nah. You know it's better to use java-style syntax except maybe methods. I like having smalltalk style methods so youcan essentially add keywords at will. The problem is that people will expect Java semantics then. Hm...