Keep Working, Worker Bee!

3.16.2006

Olin Shivers' SRE notation

I just got pointed at Olin Shivers' SRE regular-expression notation design document. Not only is it a really neat, elegantly-designed library that I'm a little surprised we haven't all adopted yet, but it's also got a pretty great preamble that's worth reading just by itself.

... [L]et's take the case of someone who wants to do web hacking in Scheme. His Scheme system doesn't have a sockets interface, so he sits down and hacks one up for his particular Scheme implementation. Now, socket API's are not what this programmer is interested in ... So he does a quick 80% job, which is adequate to get him up and running, and then he's on to his orignal goal.

Unfortunately, his quickly-built socket interface isn't general. It just covers the bits this particular hacker needed for his applications. So the next guy that comes along and needs a socket interface ... does his *own* 80% implementation. Five hackers later, five different, incompatible, ungeneral implementations had been built. No one can use each others code.

The alternate way systems like this end up going over a cliff is that the initial 80% system gets patched over and over again by subsequent hackers, and what results is 80% bandaids and 20% structured code. When systems evolve organically, it's unsuprising and unavoidable that what one ends up with is a horrible design -- consider the DOS -> Win95 path.

0 Comments:

Post a Comment

<< Home