Comment

Comment by dfox

Why C is vastly superior to C++:

  $ cat > foo.c
  #include <stdio.h>
  int main(int argc, char**argv){
    puts("hello world");
    return 0;
  }
  ^D
  $ cat > foo.cxx
  #include <iostream>
  int main(int argc, char**argv){
    std::cout << "hello world" << std::endl;
    return 0;
  }
  ^D
  $ time gcc -o hello-c foo.c
  
  real	0m0.039s
  user	0m0.020s
  sys	0m0.012s
  $ time g++ -o hello-c++ foo.cxx
  
  real	0m0.182s
  user	0m0.144s
  sys	0m0.028s
parent dfox 15 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton