Re: VS2005 doesn't like its own suggestions

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"David F" <David-White@xxxxxxxxxxxxx> wrote...

> 1. Me, as an individual doing whatever with my program, is by no means
> even close in its consequences to what MS does, even if both of us doing
> the same. When I typedef in my program, it has an effect ONLY on me.
> When MS does, it imposes something on just about 3 million C++
> programmers.

What on Earth are you talking about? You are never forced to use INT. If you know it's a typedef for
int in the situations under which you will always be compiling, why don't you use int instead? In
what situations is INT imposed upon you? You seem to be implying you can't use int just because
there's some other optional typedef around for it!

> 2. MS, as an irresponsible entity, on top of shaving my throat yet another
> keyword - INT, kept changing its definition - so far for "portability".
> Moreover, nobody showed why INT, even if they would not keep
> changing it, contributes to portability more than if they would keep int as
> 32 bit int. See again my analysis.

INT is not a keyword.

As for portability, assume the size specification doesn't change (i.e. INT is always 32 bits). Write
out an INT into a data file now. Now come back to this file and this code in 5, even 10 years' time.
Or do it now, but use a different compiler such as CodeWarrior or Borland. Under the Win32 spec, an
INT is always 32 bits, so you should have no trouble reading this value back in.

Now what do you suppose happens if your code instead writes and reads an int? You are at the mercy
of the compiler. In the future, or on a different compiler, will your code compile to reading the
same number bytes in as you wrote out previously? Who knows, since the size of int is not fixed by
your cherished ISO C++ standard, unlike other languages.

> 3. I am afraid that several participants here miss a fundamental point.
> To say that a certain OS support a certain language, means that one can
> use that language, and that language alone, w/o any other "keyword", to
> complete his writing. Several people here confuse the term "extensibility".
> They claim that "everybody does it" - "everybody has extentions".
> Extentions means adding library functions, that can simply save time
> when writing a program, but it is up to a programer to decide whether
> to use those libraries on the one hand but can as well accomplish the
> same result by not using them. There is no language changes here.
> Those MS' keywords & OS/compiler are changing, distort the language
> and sometimes forcing me to use them in order to accomplish certain
> functionality.

This argument seems very confused to me. I don't think anyone is claiming that any *OS* is directly
supporting any language. Rather, here is Windows. If you want to write programs that use the
advanced features of Windows, Microsoft provides a C SDK that allows you to do so. No keywords are
necessary for this task; some types are provided though, some structs, some simple typedefs. You
don't have to use them in your code if you aren't making use of that functionality.

I fail to see how a typedef constitutes a language change. Typedefs are a normal part of
standards-compliant C/C++. Of course you have to define them in your code for the compiler to
understand them. Handy, then, that MS provides a bunch of headers for this, no?

In addition, I believe you don't understand the difference between Microsoft's compiler, with
whatever extensions it implements, and the Windows Platform SDK. INT is not a Microsoft extension to
the language, nor can you even access it unless you're writing a non-console application. It's
defined in a *Platform SDK* header, but you can't say you're forced to use it just because you're
using MS' compiler.

Andrew


.



Relevant Pages

  • Re: [CodeGallery] MFC MD5 Calculator
    ... Then when they added types, internally, the compiler still thought they were int values, ... ANSI standard began to emerge that the language design ...
    (microsoft.public.vc.mfc)
  • OT: Re: Perl Peeves
    ... I see the result of a test being used as an int. ... the compiler just assumed you knew what you were doing ... introduced to the language later, so void * was unheard of in most code. ... This didn't mean bool was special, declaring it just signaled to the ...
    (comp.lang.perl.misc)
  • Re: VS2005 doesnt like its own suggestions
    ... When I typedef in my program, it has an effect ONLY on me. ... another keyword - INT, kept changing its definition - so far for "portability". ... To say that a certain OS support a certain language, ... Since, bugs aside, VC++ will compile essentially all standard C++ code, you are not forced to use non-standard code due to any choice by Microsoft. ...
    (microsoft.public.vc.language)
  • Re: First steps on overloading
    ... where the operand manipulation code is located, ... very many additions and changes to the language semantics. ... Allowing int + date, as well as date + int (although the former seems a bit ... compiler would reorder the operands. ...
    (comp.lang.misc)
  • Re: VS2005 doesnt like its own suggestions
    ... > Java gives fixed sizes for its int variables, ... > Using a typedef is fully consistent with ISO C++. ... To say that a certain OS support a certain language, ... MS has no business in defining, ...
    (microsoft.public.vc.language)