using RegularExpressions for matching (was Re: deficience in Squeak)

Andrew C. Greenberg werdna at mucow.com
Sun Nov 30 02:08:31 UTC 2003


>> So yes, we could add additional packages to Basic as appropriate.  
>> The only question is whether the RegExp package is something we want 
>> to include with the default set of developer tools.  I personally 
>> probably wouldn't use it, but it could be useful for a lot of 
>> people... it might be worth including.
>
>
> dunno what my advice is worth, but here's my opinion as a developer 
> (and an emacs lover): RegExp is very, very useful.

No doubt it is.  The plugin wasn't incorporated into the bloated image 
of its day principally because, at the time, the Plugin was different 
in kind from other Squeak code.  Until then, almost all of the code for 
the interpreter and plugins were written either in Smalltalk or 
Squeak's Slang subset (which is translable to C).  Also, at that time, 
the entire interpreter and system plugins could be built --at least 
theoretically-- from the generally distributed image and nothing else 
but a C-compiler.  The brilliant bootstrap and its progeny was a point 
of significant pride for the Squeak community, one I clearly understood 
and respected.

In contrast, RePlugin is mostly a Smalltalk wrapper and a bit of glue 
code in Slang for linking to a larger body of "pure" C-language code 
(the excellent PCRE library written and maintained by Phillip Hazel, 
used in Python, I think Ruby and many other projects).  Thinking that 
RE would be a very happy tool to incorporate into Squeak, I even set 
out at one time to overcome the philosophical impedence mismatch by 
recoding RePlugin in Slang, only to realize before I got too far how 
truly silly it would be to maintain that  while Phillip and the PCRE 
community are dedicating their lives to maintaining and building from 
their C-language codebase.

Nowadays, non-Slang/Smalltalk code in plugins is commonplace, 
particularly for encryption and multimedia applications.  I see no 
cultural reason not to make the object code for the plugin, at least, 
and possibly the wrapper, a part of the build.  I'd very much like to 
see that happen.

The real virtue of RE, however, would come form its ubiquitous 
incorporation throughout Squeak's tools and code base and incorporation 
into various string-related libraries, which is something that will 
NEVER happen until the chicken-and-egg meet and everybody has it.  So a 
useful tool remains an oddity in the Smalltalk world.  I still use it 
quite a bit (you'll never believe why I first wrote it!), but that's 
probably why I built it.

:)




More information about the Squeak-dev mailing list