Messages in this thread | | | Date | Mon, 11 Jan 1999 13:31:52 -0500 | From | Chip Salzenberg <> | Subject | Re: C++ in kernel (was Re: exception in a device driver) |
| |
According to Anthony Barbachan: > I would avoid the use of either exceptions or especially the STL > like the plauge as these features would lead to unfollowable/ > unreadable code.
I thoroughly disagree that either the STL (esp. the algorithms part) or exceptions inevitably leads to unreadable code.
Exceptions may be a really useful way to (e.g.) return -ENOENT from three or four levels deep in filesystem code -- without testing for error conditions at each call level. But you have to go whole-hog; a hybrid part-exception- part-error-return system would simply add complexity.
And STL iterators and algorithms *could* be useful for some kernel structures. You'd have to experiment to know for sure.
> I agree with you here. The problems bought in by threads usually aren't > worth the trade off.
Ditto. The C++ Perl implementation I mentioned in a previous message undoes the threading experiment contained in Perl 5.005. -- Chip Salzenberg - a.k.a. - <chip@perlsupport.com> "When do you work?" "Whenever I'm not busy."
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |