Thread: whats with C?

  1. #16
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Quote Originally Posted by B0bDole
    isnt c++ object oriented?

    c clearly isn't... natively anyways.
    IIRC there was an Object C that was OO. You can use ADT programming to simulate OO in C but true OO is not really viable in C.

    C, C++, Python, PHP, (but not C#) are all tools that were designed to run on any platform but have different uses. If you were writing a program for an embedded system that had a very small stack you had better be using C over C++. And you probably should be using Structured / Prodecural programming over OO programming. But thats because of the limitations of the environment. use the right tool and all will be well.

  2. #17
    x4000 Ruski's Avatar
    Join Date
    Jun 2002
    Location
    Outer Space!
    Posts
    542
    Quote Originally Posted by whoie
    Personally, it has nothing to do with features, and everything to do with availability and choices. In my universe, C++ compilers are rare. Good, reliable C++ compilers are even more rare. I'm not even talking about tools either, just compilers. BTW, I don't write desktop or web applications, and my programs are less than 20 source files on average.

    I have a small, easily portable RTOS kernel written in C, and a wealth of code for common components that is all written in C. So, it might be better, but it isn't necessary for me to be productive.

    Like I said, that's just me.
    C++ compilers aren't rare.. Even in the place wher I live they aren't rare.. as long as you have access to the internet you can get any free compiler.. There was a list somewhere.. faq or maybe search.. Dev-C++ isn't a bad choice.. I use it myself.. Anything that I compile in visual C++ 6.0 and metrowerks codewarrior 8 can compile and run in dev c++ as long as I have the dlls
    what does signature stand for?

  3. #18
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    > umm.. right.. so why don't people just forget C and start programming all on C++?
    Because there are many more machines in the world other than the one sitting on your desk.

    There are a whole range of embedded devices which do not have a C++ compiler at all - your only choice is 'C' or whatever obscure assembler that's available.
    http://sdcc.sourceforge.net/
    Check out the processor support for this C compiler, and see how far you get finding good C++ compilers for them.

    Creating a C compiler is far easier than creating a C++ compiler. If your market is pretty small, the investment in time is harder to justify.

    Even when there is a C++ compiler, all sorts of real time constraints (processor speed, memory occupancy, inter-process communication) mean that you can't just use C++ for everything. Even when it can be used, there are often guidelines to restrict it to "c++ lite" (basically a nice easy subset of C++).
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #19
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    Quote Originally Posted by Ruski
    C++ compilers aren't rare.. Even in the place wher I live they aren't rare.. as long as you have access to the internet you can get any free compiler.. There was a list somewhere.. faq or maybe search.. Dev-C++ isn't a bad choice.. I use it myself.. Anything that I compile in visual C++ 6.0 and metrowerks codewarrior 8 can compile and run in dev c++ as long as I have the dlls
    Congratulations, you completely missed the point. And the point is that not everyone has the same setup as you, and there are a lot of systems that simply will not support a C++ compiler. Even those that do may not support a good C++ compiler.
    My best code is written with the delete key.

  5. #20
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    Quote Originally Posted by Ruski
    umm.. right.. so why don't people just forget C and start programming all on C++? if it's much better and has the same features as C does?
    Here's an example: the FAA will not certify anything for flight that is running code that was written in C++, as the flow of the program is inherently not as deterministic as the flow of a C program. C code, however, can be certified. There's a multi-billion dollar a year reason to use C.
    Away.

  6. #21
    Banned nickname_changed's Avatar
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    986
    Quote Originally Posted by Thantos
    C, C++, Python, PHP, (but not C#) are all tools that were designed to run on any platform
    Minor correction - C# does run on multiple platforms.

  7. #22
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Quote Originally Posted by stovellp
    Minor correction - C# does run on multiple platforms.
    But it was hardly designed for it. Sure, the language itself is pretty platform-independent, but the design of the .Net library is inherently bound to Windows concepts. Just look at how much trouble the Mono project had with implementing Windows.Forms.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  8. #23
    Registered User
    Join Date
    Jun 2004
    Posts
    722
    in C there isn't object construction/unwindding (no function calls). No variables auto initialized, no type checking (therefore more efficient altough less safer). But unfortunately no thiscall convention

Popular pages Recent additions subscribe to a feed