From: John Madsen (johnmadsen_usenet_at_[hidden])
Date: 2003-07-20 00:12:26
"Eugene Lazutkin" <eugene_lazutkin_at_[hidden]> wrote:
>> already suggested that it would be worthwhile for FILE*s and file
>I am not in position to judge their reasons --- I never had this need. Maybe
>I avoided their specific problems somehow. Or these problems are not
>frequent enough. Anyway, I can speak only for myself. And I am not convinced
That's fine, but I was responding to your point that smart_handle is platform
specific to Windows. I think I've provided ample evidence that it isn't.
>> >Usually solution and problem go in pair. And problem goes before
>> >In this case solution is our response to problem. Well, your comment
>> >me that we have a solution in search of a problem. Not that there's
>> >wrong with that.
>> See point above.
>Hmm. I expected that _you_ will tell in your proposal something like that:
>"There is this huge set of problems. These are specific examples majority of
>programmers are struggling with frequently. (Stone cold facts and examples).
>And this is how I propose to change our hard life to the better.
>(Solution)." :-) Something like that. Instead you proposed solution without
>proofs of problem. I guess I had wrong expectations.
I'm not sure how "stone cold" they are, but I mentioned Windows' handles, file
descriptors, and FILE*s in my original message.
>> Automatic conversions are well known sources of hard to find bugs. Six
>In all cases? Well, programming itself is well known source of hard to find
>bugs. :-) I don't think that this is valid argument in this particular case.
>> characters hardly seems like a big deal.
>And still nobody uses auto_ptr like this: p.get()->XXX(). :-) If we can
I was never suggesting that anyone used auto_ptr like this.
>simplify our life, we should. If we can save 1 character in frequently used
>idiom, we should.
If you can convince most of the people on this list to provide an automatic
conversion, more power to you. I still maintain that avoiding hard to diagnose
errors is worth much more than saving 6 characters of typing.
For a discussion of why user defined conversions are a bad idea (not always,
but most of the time), see More Effective C++, Item 5.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk