pattern matching (was re: that other use for squeak)

daniel vainsencher danielv at netvision.net.il
Thu Jul 6 01:06:17 UTC 2000


Marcel Weiher <marcel at metaobject.com> wrote:
> for example, it would be really cool if I could just use the pattern  
> to match as the name of the method in a normal method browser, and  
> have the class's dispatcher then do the string matching when it tries  
> to look up the method.
Can you give a usage case? just to make it more concrete.
I'm wondering maybe alot of what you want can be done by creating a
matchOf: that's similar to caseOf:. Rough implementation attached.

BTW
> The part I am currently not so sure about is getting the development  
> tools to accept a method that doesn't have a 'proper' method header,  
> but rather some strange goobledygook of a pattern.  My first thought  
> was hacking the compiler, but that's probably not a good idea.  Hmm,  
> maybe making sense of the message header (and body) should be  
> delegated to the class being edited. 
The class edited specifies it's compiler, so this should not be a
problem, though it might require you to hack *a* compiler, for whatever
language you want to use.

> Marcel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MatchOf.1.cs
Type: application/octet-stream
Size: 846 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000706/170b1eee/MatchOf.1.obj
-------------- next part --------------




More information about the Squeak-dev mailing list