View Poll Results: What would you like to see?

Voters
16. You may not vote on this poll
  • Embedded C extensions

    4 25.00%
  • New character types in C

    2 12.50%
  • Safer C library functions

    7 43.75%
  • Decimal floating point support

    4 25.00%
  • None of them - no more features

    6 37.50%
  • something else (explain)

    2 12.50%
Multiple Choice Poll.

Thread: Which features would you like to see in future implementations of the C language?

  1. #1
    Registered User TactX's Avatar
    Join Date
    Oct 2005
    Location
    Germany.Stuttgart
    Posts
    65

    Which features would you like to see in future implementations of the C language?

    Which features would you like to see in future implementations of the C language?

    Links beneath are PDFs by the ISO/IEC Working group:

    - Embedded C extensions
    - New character types
    - Safer C library functions
    - Decimal floating point support

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    How about internationalization features that don't feel like they were thrown together in ten minutes and then patched onto the language with duct tape and bubble gum? How about time and space complexity requirements for library algorithms? How about standard data structure libraries so we don't have to keep rolling our own or using third party libraries?
    My best code is written with the delete key.

  3. #3
    Registered Luser cwr's Avatar
    Join Date
    Jul 2005
    Location
    Sydney, Australia
    Posts
    869
    Features from C++ that don't incur runtime overhead, such as templates, so we don't have to use void * for our generic data structure implementations.

  4. #4
    Registered User
    Join Date
    Oct 2005
    Posts
    53
    A neat, easy and improved rand function
    "I tend to use my inbox as a todo list. But that's like using a screwdriver to open bottles; what one really wants is a bottle opener" - Paul Graham

  5. #5
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    don't need any new features -- in fact c language (embedded exempt) should be made obsolete (depreciated).

    cwr: if you want templates then use c++.

  6. #6
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >A neat, easy and improved rand function
    rand is already neat and easy, so what were you thinking of for "improved"? Most of the problems come from people who don't know how to use it correctly, not from any inherent flaws in the standard definition. Besides, it's hard to set requirements for a random number algorithm without specifying the algorithm you want by name.

    >in fact c language (embedded exempt) should be made obsolete (depreciated)
    It would be a real shame if this happened. It's a good thing the people who could make it happen have a somewhat more reasonable perspective.
    My best code is written with the delete key.

  7. #7
    Registered User cbastard's Avatar
    Join Date
    Jul 2005
    Location
    India
    Posts
    167
    Sounds like Brother is making a new C compiler and trying to rectify the problem faced in current compiler
    Last edited by cbastard; 10-18-2005 at 12:58 PM.
    Long time no C. I need to learn the language again.
    Help a man when he is in trouble and he will remember you when he is in trouble again.
    You learn in life when you lose.
    Complex problems have simple, easy to understand wrong answers.
    "A ship in the harbour is safe, but that's not what ships are built
    for"

  8. #8
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    Quote Originally Posted by Prelude
    in fact c language (embedded exempt) should be made obsolete (depreciated)
    It would be a real shame if this happened. It's a good thing the people who could make it happen have a somewhat more reasonable perspective.
    Right now two nearly identical languages are being supported. C++ can do everything that C can do, so why have this duplication? Any C program can be compiled by most c++ compilers with only minor changes, such as typcasting malloc() and other functions that return void*. There should be NO new programs written in C.
    Last edited by Ancient Dragon; 10-18-2005 at 12:58 PM.

  9. #9
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,218
    Quote Originally Posted by Ancient Dragon
    don't need any new features -- in fact c language (embedded exempt) should be made obsolete (depreciated).

    cwr: if you want templates then use c++.
    I prefer C over C++. And I think cwr meant that it would be nice if a few of the useful C++ features were brought over to C without the rest of the crap that makes up the language.

    Just because computers are faster these days doesn't mean lower-level languages should be ousted. What will you say when embedded systems become more powerful? It should be "depreciated" for those systems too?

    Like Prelude said, I'm glad someone else is in charge of the decision-making process.

    Personally, I like C the way it is. The simpler the better IMHO.
    If you understand what you're doing, you're not learning anything.

  10. #10
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    Quote Originally Posted by itsme86
    I prefer C over C++. And I think cwr meant that it would be nice if a few of the useful C++ features were brought over to C without the rest of the crap that makes up the language.

    Just because computers are faster these days doesn't mean lower-level languages should be ousted. What will you say when embedded systems become more powerful? It should be "depreciated" for those systems too?

    Like Prelude said, I'm glad someone else is in charge of the decision-making process.
    What you and cwr are attempting to do is turn C into a bastardized version of c++. Writing C++ programs doesn't mean you have to toss out all knowledge of C and replace with C++ classes. You still have the option of using most C functions and structures because they are all part of the c++ language. What I'm suggesting is to throw out something called "C language" and "C compilers" because there is little, or no, need for them any more. They are just old dinosaurs left over from the 80's and earlier.

  11. #11
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >C++ can do everything that C can do, so why have this duplication?
    C++ can do everything that C can do, and it can do more...a lot more. I use about 80% of C on a regular basis, but less than 10% of C++. There's no point in using a language that includes everything that you'll never use when you have another language that does everything you need without all of the fluff. Small is beautiful, but C++ advocates don't seem to get that. Oh well, it's not like I'll convince you otherwise. Such is the way with subjective opinions.

    Like I said, I'm glad you're not calling the shots or everything older than Java would be "depreciated" even though the best languages are the older ones.
    My best code is written with the delete key.

  12. #12
    Registered User
    Join Date
    Sep 2005
    Location
    Sydney
    Posts
    60
    Yes, C++ can do everything C can do. (Actually C can do everything C++ can as well, but that's beside the point.) And Java can do everything C++ can do. And perl can do everything Java can do. So let's throw them all out and just have one super-language that can do everything? I think not.

    The whole point of having all these different languages is that each one suits particular purposes. Use the right tool for the job. C++ does not do some things nearly as well as C, for example, code that needs to be very efficient is better written in C. This is not really due to the language C++ - you can express the same thing in C++ as you can in C - but rather the implementation of it. C++ is OO, it has a lot more overhead than C. If you need code that runs quickly, or uses very little memory, etc, C++ won't be much good. And despite the increasing power of today's computers, there are still many programs that have such requirements - operating systems, low-level networking code, embedded systems and so on. Not everyone's an application programmer.

  13. #13
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >C++ is OO, it has a lot more overhead than C.
    Only if you ask for it. If C++ had as much overhead as you suggest, then nobody would have moved from C to C++. I haven't had overhead problems since using a rather old version of Borland that couldn't manage to output decent object code.

    >If you need code that runs quickly, or uses very little memory, etc, C++ won't be much good.
    Maybe you have a crappy compiler. C++ is comparable to C when I'm writing for performance or under space constraints.
    My best code is written with the delete key.

  14. #14
    Disrupting the universe Mad_guy's Avatar
    Join Date
    Jun 2005
    Posts
    258
    Quote Originally Posted by Ancient Dragon
    don't need any new features -- in fact c language (embedded exempt) should be made obsolete (depreciated).

    cwr: if you want templates then use c++.
    You are a template.

    Quote Originally Posted by Ancient Dragon
    Right now two nearly identical languages are being supported. C++ can do everything that C can do, so why have this duplication? Any C program can be compiled by most c++ compilers with only minor changes, such as typcasting malloc() and other functions that return void*. There should be NO new programs written in C.
    Fascinating. But what was the entire point of this post? To sum up what you just said "C++ can do everything C can do since C++ compilers can generally compile C so that means that C is depricated and should be shot into oblivion." I don't see what relevence compilers have to whether or not a language should be officially set aside for retirement. Saying "C++ compilers compile most C" isn't a compelling arguement.

    Quote Originally Posted by Ancient Dragon
    I'm suggesting is to throw out something called "C language" and "C compilers" because there is little, or no, need for them any more. They are just old dinosaurs left over from the 80's and earlier.
    Once again you don't back up WHY it should be thrown out other than "it's old," Assembly is a gazillion times older than C but I don't hear you preaching for it's destruction. What about FORTRAN or COBOL? Why shouldn't they be thrown out? Why purpose do they fufill that C doesn't that is inexorably more important? If you're going to use age as an arguement you might as well be fair.



    If you would post with a freaking half-way logical arguement that doesn't point out every little idiosyncrasy (like a dick would) in the C language or use "it's old" in it or any relations thereof, then maybe you'd be taken more reasonably.
    Last edited by Mad_guy; 10-18-2005 at 09:20 PM.
    operating systems: mac os 10.6, debian 5.0, windows 7
    editor: back to emacs because it's more awesomer!!
    version control: git

    website: http://0xff.ath.cx/~as/

  15. #15
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,218
    Quote Originally Posted by Prelude
    >C++ is OO, it has a lot more overhead than C.
    Only if you ask for it. If C++ had as much overhead as you suggest, then nobody would have moved from C to C++. I haven't had overhead problems since using a rather old version of Borland that couldn't manage to output decent object code.

    >If you need code that runs quickly, or uses very little memory, etc, C++ won't be much good.
    Maybe you have a crappy compiler. C++ is comparable to C when I'm writing for performance or under space constraints.
    Code:
    itsme@itsme:~/C$ cat helloworld.c
    #include <stdio.h>
    
    int main(void)
    {
      puts("Hello, world!");
    
      return 0;
    }
    itsme@itsme:~/C$ gcc -Wall helloworld.c -o helloworld
    itsme@itsme:~/C$ ls -l helloworld
    -rwxr-xr-x  1 itsme users 10563 2005-10-19 10:16 helloworld*
    itsme@itsme:~/C$ ./helloworld
    Hello, world!
    itsme@itsme:~/C$ cd ../C++
    itsme@itsme:~/C++$ cat helloworld.cpp
    #include <iostream>
    
    using namespace std;
    
    int main(void)
    {
      cout << "Hello, world!" << endl;
    
      return 0;
    }
    itsme@itsme:~/C++$ g++ -Wall helloworld.cpp -o helloworld
    itsme@itsme:~/C++$ ls -l helloworld
    -rwxr-xr-x  1 itsme users 12789 2005-10-19 10:17 helloworld*
    itsme@itsme:~/C++$ ./helloworld
    Hello, world!
    itsme@itsme:~/C++$ gcc -v
    Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.4/specs
    Configured with: ../gcc-3.4.4/configure --with-arch=athlon
    Thread model: posix
    gcc version 3.4.4
    itsme@itsme:~/C++$ g++ -v
    Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.4/specs
    Configured with: ../gcc-3.4.4/configure --with-arch=athlon
    Thread model: posix
    gcc version 3.4.4
    itsme@itsme:~/C++$
    A 17.4% increase in file size seems pretty significant. I'm sure it's not the same for all applications, but in general I've noticed that C++ compiled programs that accomplish the same thing as a C program tend to be larger.
    Last edited by itsme86; 10-19-2005 at 11:26 AM.
    If you understand what you're doing, you're not learning anything.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 0
    Last Post: 04-06-2007, 04:55 PM
  2. The Java language is being expanded
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 26
    Last Post: 06-11-2004, 09:07 PM
  3. Updates to the C++ language?
    By incognito in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 04-21-2004, 05:56 PM
  4. Why learn C?
    By Clyde in forum A Brief History of Cprogramming.com
    Replies: 31
    Last Post: 04-07-2002, 10:05 PM
  5. Visual J#
    By mfc2themax in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 10-08-2001, 02:41 PM