Next C standard

This is a discussion on Next C standard within the C Programming forums, part of the General Programming Boards category; Will the next C standard or any of the ones after that increase the libraries to support the things that ...

  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    266

    Next C standard

    Will the next C standard or any of the ones after that increase the libraries to support the things that C++ is like multi-threading or networking?

  2. #2
    Registered User valaris's Avatar
    Join Date
    Jun 2008
    Location
    RING 0
    Posts
    507
    Doesn't C already support this through POSIX and BSD sockets?

  3. #3
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Quote Originally Posted by valaris View Post
    Doesn't C already support this through POSIX and BSD sockets?
    POSIX is not C.
    POSIX is one standard and C is another.

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by lruc View Post
    Will the next C standard or any of the ones after that increase the libraries to support the things that C++ is like multi-threading or networking?
    I don't believe that C++ has standard support for multi-threading or networking, and I doubt that either of the new standards for C or C++ will encompass any networking functionality into the standard library. C and C++ is used for a huge number of systems on various architectures. Not all of the OS's that are used to run C or C++ on will have networking, and I don't think you will ever see more than about a few of the standards committee members agreeing on WHICH standard the networking functions would have.

    Some support for multithreading is part of C++0X as far as I understand, and a new C standard may well follow those basic principles.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Quote Originally Posted by matsp View Post
    Some support for multithreading is part of C++0X as far as I understand, and a new C standard may well follow those basic principles.

    --
    Mats
    How can that be? Just as not all systems support networking, not all systems support multithreading either.

  6. #6
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by cpjust View Post
    How can that be? Just as not all systems support networking, not all systems support multithreading either.
    Good point. I don't know why that is. But I expect that compiler support is somewhat needed for solving some multithreading issues, whilst supporting networking is simply a case of library code, and there is much less need for compiler support for that. It becomes libraries. A standardization layer on top of networking could be feasible, but my expectation at least would be that it's too far away from the core functionality of the language as such.

    Likewise, I don't expect to see a standardized GUI library any time soon - because it's far too hairy a mess to sort out who is right and who is wrong in their ideas in that idea, and the compiler doesn't need to know even a little bit.

    Edit: Here is the proposals for Multithreading: http://www.open-std.org/jtc1/sc22/wg...006/n2094.html
    Of course, that is a proposal, it may change or get removed from the standard.
    The full C++0X standards submissions are here:
    http://www.open-std.org/jtc1/sc22/wg...2006/n2122.htm
    And there is no mention of networking on that entire page.
    --
    Mats
    Last edited by matsp; 08-08-2008 at 08:59 AM.
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  7. #7
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,555
    I suspect because it's a big issue and C++ is a modernization of C, after all. It was built to meet today's needs.
    We're seeing a bigger leap towards more and more cores, but only in PCs, but also in embedded things.
    So I'm guessing it's one of those "must have" things to keep C++ from falling down into history as an abandoned language.
    Perhaps C will follow, as well.

    As for GUI, I believe many want one, but it just takes too much time and money to put it together, which the committee doesn't have.
    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.

  8. #8
    Registered User
    Join Date
    Jun 2008
    Posts
    266
    TR2 is a proposal that has a library to support networking. It is based off the asio boost networking library. Considering most of the TR1 is supposed to be in C++09, I would assume that the next standard will cover some if not most of TR2. It may not be soon but networking will happen sometime in the future.
    >>How can that be? Just as not all systems support networking, not all systems support multithreading either.
    Not all systems have a screen to support the iostream do they?

  9. #9
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Quote Originally Posted by lruc View Post
    >>How can that be? Just as not all systems support networking, not all systems support multithreading either.
    Not all systems have a screen to support the iostream do they?
    I don't think anything in <iostream> is specific to screens or keyboards... It's just some type of input stream and some type of output stream. Whether the input and output are keyboards & monitors, or files, or printers...

  10. #10
    Registered User
    Join Date
    Jun 2008
    Posts
    266
    Yes I believe your right, but it's still not right for ALL systems. I would find an iostream for a gameboy pretty interesting.

  11. #11
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,555
    Maybe not. Iostreams would be used by the system to read and write from the cartridge.
    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.

  12. #12
    Registered User
    Join Date
    Jun 2008
    Posts
    266
    I would think the fstream would be used for that. The console has no permanent memory.
    Last edited by lruc; 08-09-2008 at 06:28 AM.

  13. #13
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    fstreams inherit from iostreams IIRC

  14. #14
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Quote Originally Posted by Thantos View Post
    fstreams inherit from iostreams IIRC
    I was about to say the same thing, but then I changed my mind. I think <fstream> actually uses <istream> & <ostream>

  15. #15
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    http://www.cplusplus.com/reference/iostream/fstream/

    They show fstream inheriting from iostream which in turn inherits from istream and ostream.
    ifstream and ofstream inherit from istream and ostream individually.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Bug in iterator comparison in C++ standard?
    By steev in forum C++ Programming
    Replies: 14
    Last Post: 07-12-2008, 12:02 AM
  2. Abstract Base Class and References
    By Thantos in forum C++ Programming
    Replies: 9
    Last Post: 10-13-2004, 01:35 PM
  3. im extreamly new help
    By rigo305 in forum C++ Programming
    Replies: 27
    Last Post: 04-23-2004, 11:22 PM
  4. include question
    By Wanted420 in forum C++ Programming
    Replies: 8
    Last Post: 10-17-2003, 03:49 AM
  5. Using c++ standards
    By subdene in forum C++ Programming
    Replies: 4
    Last Post: 06-06-2002, 09:15 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21