lkml.org 
[lkml]   [1999]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.080 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site