Boost logo

Boost :

From: Walter Landry (wlandry_at_[hidden])
Date: 2004-03-12 17:08:19


David Abrahams <dave_at_[hidden]> wrote:
> Walter Landry <wlandry_at_[hidden]> writes:
>
> >> Why is a runtime error better than a compile-time error in this case?
> >
> > I implemented it this way because it was the easiest thing to do. I'm
> > happy to make it a compile-time error.
>
> I'm asking you/us to figure out what the right response is. I think
> it's the latter, but someone else should give it some thought.

Well, you could argue that making it a run-time error will result in
simpler user code. Since everyone should be checking exceptions
anyway, user code can decide whether failing to link is fatal. It
could, for example, do a copy instead.

On the other hand, you won't know until you're running the code
whether hard linking will work. That could result in a lot of wasted
time. But then if hard linking is not important, the client has to
put in #ifdef BOOST_POSIX into their code. That seems icky, but maybe
it's just me.

In general, I prefer compile-time to run-time errors.

Regards,
Walter Landry
wlandry_at_[hidden]


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