Tuesday, January 28, 2003


Where's the conversation?

One of the things that bugs me about web logs is your inability to find out who's read and commented on something you've posted.  I know that there may be various mechanisms out there for accomplishing this, but there doesn't seem to be any standardized way to do it.  We have a pretty good public thread/conversation system already; it's called NNTP.  I like the way that people put a little more time (at least some people do) into their weblog postings -- reducing the conversational nature seems to have had a good effect on the writing; each becomes more like a little essay.

I just wish there was a way to track it all, something standard, something easy...


10:58:10 AM    

Typesafe Enums.

JavaWorld is running another series on enums; yes, this issue has been covered to death in the press over the years.  Here's my take -- enums in Java are a pain in the ass to do.  Why don't we just take a quick look at what's out there, and what works?

The best model I've seen is what Delphi/Pascal do.  You can declare enumerations with contants.  They are typesafe.  Then, importantly, you can declare sets of them.  Something like this:

myEnum = (meFirst, meSecond, meThird);

myEnumSet = set of myEnum;

Handling sets of enums (and set operations) is something that happens all the time.  It's something that Pascal got completely right, way back when, and hasn't been done right in any of the major languages since.  Please, for the love of god, put proper enums and sets in the language.  They'll get used all the time, and the resulting code is wonderfully readable. 

Sometimes I miss Delphi!


10:52:53 AM