Linked by Thom Holwerda on Sun 9th Sep 2007 18:08 UTC, submitted by koki
BeOS & Derivatives "The primary intention of my previous article was to make it very clear why and when locking is needed in multithreaded applications. In this article, I want to present my experiences in writing a new prototype for a replacement of the document model in WonderBrush and how it is manipulated and rendered asynchronously."
Permalink for comment 269966
To read all comments associated with this story, please click here.
Vanders
Member since:
2005-07-06

You clearly have a pet language, so this discussion is kind of pointless, but there is one thing I want to pick up:

Maybe a message handler for one specific message type. If I remember correctly, a BLooper processes BMessage objects which are basically hashtables. So to handle multiple different message type, you end up with a giant switch statement. In each branch of the switch statement, you have to manually extract all message parameters from the BMessage. For a complex message that will be several lines of code for each message type just for the decomposition. And then you need to handle the case where some parameters are not present or of the wrong type, etc.


The thing is, all of this is trivial and no more difficult or error prone than any other form of procedural programming. It's a total non-issue, and irrelevant to any argument about threading issues, other than the fact that message passing is a good solution to reduce locking. How it is implemented is irrelevant. It's well known that C & C++ are verbose when compared to newer HLL's. If Kaj wern't so busy I'd ask him to come tell you about how wonderful and compact REBOL is.

Reply Parent Score: 2