Sunday, February 18, 2007

C++ : Indeterminate Value

The C language standard clearly 'defines' what an indeterminate value is in C. But the C++ standard is missing this definition. Naturally, we can't adopt the definition in C standard to C++. I wanted to know, and who could have been more reliable than Mr. Bjarne Stroustrup to clear this cloud of uncertainty. So, I dashed an email to him. Here's the conversation that followed:

----------------------------------

Dear Mr Stroustrup,

I am reading D&E, and let me congratulate you for writing such a great book. It has been of a lot of help. Mr. Stroustrup, I am moderating a C++ community on Orkut and there has been a very big issue over what 'indeterminate value' means for the C++ standard. The C standard clearly states what 'indeterminate value' means, but the C++ standard though using (indeterminate value) many times doesn't specify its definition. Should we regard 'indeterminate value' in C++ as being undefined, or should we stick to the C standard's definition (for 'indeterminate value')?

Anxiously waiting for the response.

Regards,
Zaman Bakshi.

----------------------------------

Thanks.

I never used "indeterminate value" and hadn't noticed that it had "snug
into" the C++ standard. I have raised an issue and "indeterminate value"
will be defined in C++0x. You can't "stick to C's definition" because
that definition has never been approved for C++ (was introduced into C
relatively lately, I believe). "indeterminate" simple means that you
don't know what that value is (if could be absolutely any bit pattern
that fits in the object). I believe the C++ standard is specific about
which operations requires a properly initialized object.

Does this address the issues raised in your discussion? If not, please
ask again.

----------------------------------

Dear Mr Stroustrup,

Thank you for replying to my e-mail. Yes, it does answer my issue. This is exactly what I had inferred, but as you know, developers like me can't argue over the standard, so had to clear the doubt. I, like others, are anxiously waiting for C++0x to be out with the standard. Good luck with it. And I thank you again for your response.

Regards,
Zaman Bakshi

----------------------------------

Thanks. I'm working hard for C++0x to become C++09. Doing that requires
a complete feature freeze and complete WP by the end of 2007.

1 comment:

Anonymous said...

Can anyone recommend the well-priced RMM program for a small IT service company like mine? Does anyone use Kaseya.com or GFI.com? How do they compare to these guys I found recently: N-able N-central software deployment
? What is your best take in cost vs performance among those three? I need a good advice please... Thanks in advance!