I haven't really tried Coral yet, so please forgive my ignorance, but have you thought of using a modified block syntax to define methods?
I'm thinking of something like this:
[factorial | "Answer the factorial of the receiver."
self = 0 ifTrue: [^ 1]. self > 0 ifTrue: [^ self * (self - 1) factorial]. self error: 'Not valid for negative integers' ]
[min: aMin max: aMax |
^ (self min: aMin) max: aMax ]
Evaluating one of these expressions could return a compiled method without a class.
since we cannot add a nice scripting syntax without changing the parser we decided to go for a mapping as in the code browser. hkjhjhjk [ ] Like that we can build tools and this follow java and other {} languages. for the << this is fun.
And since we use the ">>" to retrieve a method, we could use the "<<" operator to add it to a class's method dict.
I think it would make a very simple and consistent syntax. And maybe we could even modify the entire system to support it. I wouldn't mind seeing a couple of extra brackets and a vertical bar in the browser if the method's syntax is made more consistent.
but it would look also different. So getting closer to mainstream is not a bad idea. Gnu and pepsi did the same and probably resilient. Stef