Thread: Why not add CUDA forum?

  1. #31
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by whiteflags View Post
    Counting the STL (and I don't know why you would), that was literally the only thing unique to C++ that I learned in a class. Of course other languages have their own library code. I don't think the STL offers anything that other languages haven't got.
    Can you find smart pointers in other languages?
    Can you find generic programming to the extent that C++ offers (example, meta template programming) in other languages?
    Those are two examples. I'm sure there are more.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  2. #32
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    You really don't need those things in other languages I think.

  3. #33
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Nevertheless, they are unique to C++...
    And I wouldn't say "don't need." They are handy. Indeed, it would simplify a lot of code! Why do you think RAII constructs have been proposed for Java?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #34
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by whiteflags
    Counting the STL (and I don't know why you would), that was literally the only thing unique to C++ that I learned in a class.
    Heh, at least you had the STL. When I was taught to program with C++ a decade ago, my teacher never introduced me to the standard containers from the STL. And yeah, like you, I never heard of RAII.

    Considering the teaching computer science, what I like about the C++ standard library is the stuff from <algorithm> and <numeric>, along with their complexity guarantees. Oh, and the standard containers too, but those are certainly quite common in programming languages as built-in constructs or part of standard libraries.

    Deterministic destruction/resource release through RAII is no longer unique to C++, though RAII in the form that C++ uses is unique, methinks.* Considering programming in practice, I like RAII as it is also applicable to resources other than memory. Furthermore, because RAII is a tool for automated memory management in C++, it certainly is more prominent in C++ than in programming languages that default to the use of garbage collection.

    * I'm thinking of C#'s using statement and Python's with statement which introduce new blocks of scope when RAII is to be used, either for correctness in the face of exceptions or because it is just required, compared to just creating the objects in C++. No big deal when the aim is for the RAII object to be destroyed at the end of a local scope (and prettier when you do want the object to be in a more local scope), but I imagine that this complicates matters if the aim is for deterministic destruction with the aid of smart pointers.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 03-19-2009, 12:02 PM
  2. New to C and forum, need some help!
    By Icebreaker9 in forum C Programming
    Replies: 4
    Last Post: 02-10-2009, 09:45 PM
  3. General forum question - if in wrong forum...
    By ulillillia in forum A Brief History of Cprogramming.com
    Replies: 28
    Last Post: 05-14-2007, 05:00 AM
  4. no SDL forum ?
    By black in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 10-28-2002, 09:24 PM
  5. Replies: 7
    Last Post: 09-08-2002, 02:20 PM