Re: Cracking DES with C++ is faster than Java?

From: Julie (julie_at_nospam.com)
Date: 04/28/04


Date: Wed, 28 Apr 2004 09:43:59 -0700

Tom St Denis wrote:
>
> Julie wrote:
> > "Douglas A. Gwyn" wrote:
> > [snip]
> >
> >>(Since the languages do not have a subset/
> >>superset relationship, in general compiling a
> >>C source program with a C++ compiler is not safe.)
> >
> >
> > Compare that with what BS says in TC++PL:
> >
> > http://www.filibeto.org/sun/lib/development/c++_iiird/appB.pdf
>
> Um I just read that PDF. The PDF seems to agree that there are valid
> [albeit of questionable usage] C statements that are not valid in C++
> [and vice versa].
>
> I don't see how that contradicts what Douglas said.

Step by step, then:

Douglas A. Gwyn wrote:
  
  (Since the languages [C and C++] do not have a
  subset/superset relationship, in general compiling a
  C source program with a C++ compiler is not safe.)

TC++PL, Bjarne Stroustrup, Appendix
  B.2 C/C++ Compatibility
  With minor exceptions, C++ is a superset of C. Most
  differences stem from C++'s greater emphasis on type
  checking. Well-written C programs tend to be C++
  programs as well. All differences between C++ and C
  can be diagnosed by a compiler.

Even simpler yet:

  Doug: "do not have a subset/superset relationship"

  Bjarne: "C++ is a superset of C"

  Doug: "in general compiling a C source program with a
    C++ compiler is not safe"

  Bjarne: "Well-written C programs tend to be C++
    programs as well"

Simplest:

  They contradict.



Relevant Pages

  • Re: Cracking DES with C++ is faster than Java?
    ... The PDF seems to agree that there are valid ... > I don't see how that contradicts what Douglas said. ... C source program with a C++ compiler is not safe.) ... differences stem from C++'s greater emphasis on type ...
    (comp.lang.cpp)
  • Re: Cracking DES with C++ is faster than Java?
    ... The PDF seems to agree that there are valid ... > I don't see how that contradicts what Douglas said. ... C source program with a C++ compiler is not safe.) ... differences stem from C++'s greater emphasis on type ...
    (sci.crypt)
  • Re: What I can to do with old PL/1 code?
    ... > You have documentation on all of the option in the PDF. ... as you have current documentation. ... Programming Reference for both! ... that as I bought compiler a long ...
    (comp.lang.pl1)
  • Re: Dont understand syntax error
    ... >> Have you already declared PDF before using it in ... >> It would help if you could let us have the defintion of PDF? ... If you have a type "struct PDF", ... > compiler allows you to do so, it's not a C compiler (it's probably a ...
    (comp.lang.c)