Boost logo

Boost :

From: Maciej Sobczak (maciej_at_[hidden])
Date: 2003-06-07 02:46:16


Hi,

Alexander Terekhov wrote:

> Show me some code. I mean something that shows why do you need counting
> semas.

This wording is too strong. Going this way, we can *always* say that
feature X is not deadly needed and can be replaced by two or more
(probably lower-level) features Y.
We could write assembly as well.

The problem with semas is that many textbooks use them as a mean to
describe some ideas. A lot of algorithms are explained in terms of semas
and mutexes, and not in terms of mutexes and condvars.
One could argue that every algorithm can be transformed to use only
mutexes and condvars, but imposing this additional (and *this* is
error-prone for sure) redesign work on programmers wanting to just get
things done is *not* in the mission statement of any high level library
and Boost in particular. The mission is to provide the programmers with
the tools they want and IMHO semas fall into this category.
If we rewrite all textbooks (starting with all those where 'Dijkstra' or
'Agrawal' appear), then maybe in the next century I will answer your
question: "I don't see any".

If the library has no semas, then programmers will for sure roll their
own, most likely flawed, implementations. It is much better to do it for
them, as a joined effort of those who know how to do it well.

(No, "brain-dead pulsing events" are not really needed. ;) )

-- 
Maciej Sobczak
http://www.maciejsobczak.com/
Distributed programming lib for C, C++, Python & Tcl:
http://www.maciejsobczak.com/prog/yami/

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk