I do. Mainly because its the lowest common denominator -- especially for libraries. It can be directly called from C, and C++ code. And can be called from Java and .NET code with a small wrapper.
Mainframes are still more powerfuller than microcomputers. C on the mainframe for transaction processing (mission-critical data processing) remains stable....it all about the MIPS
C is probably used a lot for embedded software. The world is full of billions of devices such as smart cards, washing machines, television sets, printers, barcode scanners, digital cameras, ... Your keyboard and mouse even contain controller chips that most likely contain software that was written in C.
The Linux kernel is also written in C, and Linus Torvalds is very much opposed to C++.
I do. It's the major language used by trade settlement system owned by one of the large investment banks. They are of course going to replace the system with a Java based one - someday!
Regards Pete
Bert Bates
author
Sheriff
Joined: Oct 14, 2002
Posts: 8712
posted
0
Alan Kay is (IMHO), justifiably harsh with his critiques of many programming languages, including Java, but I love this quote:
"Actually I made up the term "object-oriented", and I can tell you I did not have C++ in mind."
I'm reading a second book about Objective-C and I really really like it.
It is really minimal and -if I can say- a true C language.
I don't know why people say bad things about Objective-C.
John Todd wrote:
I don't know why people say bad things about Objective-C.
Who says bad things about Objective-C?? Back then, all I heard was nice things about it.... It was just unfortunate that it was only available on the NextStep box, while the rest of the world was using C++. If it was available for the platform that I used back then, I would have certainly considered it over C++. Heck, I considered pascal over C++, and that's a procedural language.
Some say Objective-C has a crazy syntax and it is not a true OO language.
But any way, I'm liking it.
And now I started to read negative things about C++ in this thread
Avishkar Nikale
Ranch Hand
Joined: Aug 06, 2010
Posts: 173
posted
0
I guess it is still pretty much in use & famous for projects which interact with hardware & other low level things.
I remember a cousin of mine doing a project last semester using a C program to interface with some COTS.
John Todd wrote:I don't know why people say bad things about Objective-C.
Want me to say something bad about Objective-C?
John Todd wrote:Some say Objective-C has a crazy syntax and it is not a true OO language.
Oh, you already said it yourself!
Objective-C is C with Smalltalk syntax for OO stuff. Really strange. The Smalltalk syntax does not fit at all with the syntax style of C, in my opinion. It looks like a hack, not like a language that was designed from the ground up to be a nice, clean, pure OO language.
My recent use of C for professional development was for embedded systems. Folks programming for web servers and even for PCs don't generally worry about how large the variable space is, or how many symbols are in the program's symbol table. When you are squeezing the code to avoid having to change to a larger microcontroller (aka CPU) you care a lot. Its important.
I expect that if it gets popular, you could do embedded systems with Google's new GO language.
Jesper Young wrote:
Objective-C is C with Smalltalk syntax for OO stuff. Really strange. The Smalltalk syntax does not fit at all with the syntax style of C, in my opinion. It looks like a hack, not like a language that was designed from the ground up to be a nice, clean, pure OO language.
Objective-C is created around the 80s which I think it is obvious why it smells like Smalltalk.
I agree it looks like a hack but a nice hack IMHO and I'm really amazed to see how much Java was influenced by ObjC.
John Todd wrote:Objective-C is created around the 80s which I think it is obvious why it smells like Smalltalk.
And Brad Cox, the inventor of Objective-C will gladly admit the evidence. Smalltalk was the first OO language. It was fairly foreign at the time, unlike C that looked more than a little like Algol, Fortran-77, Bliss, and other languages of its time. Back then, Smalltalk was as foreign as Scala or Haskel is today.
C++ was an experiment to layer the fadish OO concepts onto C, and to me, it totally failed. Then I think that Java has too much C and not enough OO. I understand why both C++ and Java (as well as C#) paid homage to C, but I don't think that we are better off today in 2010 with so much of a language designed in 1975.
I consider C++ a complete failure. Sure, its widely used still, but not by me. Life is too short for me to work professionally using C++.
Avishkar Nikale
Ranch Hand
Joined: Aug 06, 2010
Posts: 173
posted
0
One of the reason JavaRanch stands apart is the plethora of information available with fellow Ranchers.
I don not think any other forum would generate such a discussion & information on a simple question.
Thanks Bert for the question & all others who pitched in with their 2 cents dollars .
Jimmy Clark
Ranch Hand
Joined: Apr 16, 2008
Posts: 2187
posted
0
C and C++ are totally different programming languages.
One is a structured programming language and the other is an object-oriented programming language.
For marketing purposes and to ease and promote adoption from existing C programmers and their programs, C features were added to the C++ language to make every C program compatible with C++ compilers. This helped foster the adoption because it made it easier for "certain" C programmers to learn and work with C++.
No computer programming language is ever a failure, only programmers that fail to use them correctly or fail to develop an expertise in them are the failures...
Its all about the MIPS...
Mike Simmons
Ranch Hand
Joined: Mar 05, 2008
Posts: 2782
2
posted
0
I consider Mandarin Chinese a complete failure. Sure, its widely used still, but not by me.
Ernest Friedman-Hill
author and iconoclast
Marshal
John Todd wrote:...I agree [Objective-C] looks like a hack but a nice hack IMHO...
+1.
Personally, I found it helpful to work through a book on C before learning Objective-C. But I think that's because my Objective-C resources assumed some C basics that I didn't have. (I really hope I have time to get back to that this winter...)
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org
Frank Bennett wrote:No computer programming language is ever a failure, only programmers that fail to use them correctly or fail to develop an expertise in them are the failures...
No, I believe, IMHO, etc., that C++ fails as a language because it is too complex for normal programmers to make work. The second and third major problems were patched over in later releases (awful IO conventions, lack of String, etc.) and huge code bloat (mostly fixed with templates). But the essential language is just too complex. Who needs multi-inheritance? Who can make it work? The rules for when an overloaded virtual function is called, or not called are difficult to figure out with trivial example cases, and impossible when you have real world class hierarchies that are ten or more layers deep.
I will also claim that we professionals have failed by not kicking C++ to the junkyard of obsolete languages at least 15 years ago.
For real time mission critical applications in domains like aeuronotics ,radar ,avionics etc C is the preferable one and still using
VIJINDAS
Ryan McGuire
Ranch Hand
Joined: Feb 18, 2005
Posts: 945
posted
0
vijin das wrote:For real time mission critical applications in domains like aeuronotics ,radar ,avionics etc C is the preferable one and still using
Real-time, yes. Mission-critical, not necessarily. If you have an embedded processor in any kind of real-time machine, whether it's a plane's avionics or the dollar bill acceptor in the cafeteria's pop machine, you'll probably want to use C.
In the last real-time system I worked on, we wrote the basic code in C and then hand-optimized the assembly code.
Actually, the embedded folks are starting to move away from C. Sure, for decades, the standard language for embedded systems was C. And it still is for many applications. But the "must use C for embedded" is no longer the law. There are a lot of languages gaining traction in the embedded space, two that I've used are Lua and Python.
Higher level languages always have the standard advantages over low level languages like C.
I expect that Google's GO would do well in a lot of embedded applications.
Well C is very strong and in industry many big technologies are using it and most of native codes are written in C only... In case of java also the native code majory written in C and C++ only..
Difficult to understand it's behaviour ..... C ROCKS so do JAVA
No Kaustubh No Fun, Know Kaustubh Know Fun..
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32712
4
posted
0
Pat Farrell wrote: . . . Smalltalk was the first OO language. . . .
What is Object Oriented? I will grant that Simula predated Smalltalk. But to use the same weak source: Object oriented programming
The Smalltalk language introduced the term object-oriented programming to represent the pervasive use of objects and messages as the basis for computation.
IMHO, the whole "OO" phrase is just marketing spin. Good OO code is good code. You can hide the implementation within the API in any language. And that is a good idea.
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32712
4
posted
0
Pat Farrell wrote: . . . You take Wikipedia as a source? . . . But to use the same weak source: Object oriented programming . . .
From that article, it appears people were thinking object-oriented as far bask as the 1950s. I think this might well be relegated to one of those great "don't know"s.
I no longer use C or C++.
I learned C at the university in my first year(2000) and in the 2nd I learned Java. I started using Java and never looked back.
Somehow the freedom from thinking about pointers and destructors was what I needed (or what my brain needed).
Still the ability to run a program like "ls" in Linux without starting the huge JVM is critical so for embedded stuff and operating systems I think C (not even C++) is here to stay.
That being said I am trying to learn Ruby to simplify my programming solutions even further (considering also the not so clear future of Java after the .. let's say aquisition by Oracle)
As always I consider myself a software engineer who has to make the right choice for the task required so I try not to get into religious war. As needed I used PHP , Java , C , C++ and now Ruby(after I get some experience with it).
Better, faster, lighter Java ... you mean Ruby right ?
SCEA5,SCBCD1.3,SCWCD5,SCJP1.4 - memories from my youth.
Pat Farrell wrote:
. . . Smalltalk was the first OO language. . . .
Pat Farrell wrote:
. . . You take Wikipedia as a source? . . . But to use the same weak source: Object oriented programming . . .
well below is also some wikiepedia facts ...it's not always right ...don't fight brothers
Jack Straw, the foreign secretary, makes surprise visits to Ilford instead of Iraq and Robbie Williams earns his millions eating pet hamsters. Oh, and David Beckham was a Chinese goalkeeper in the 18th century.
Jimmy Clark wrote:For marketing purposes and to ease and promote adoption from existing C programmers and their programs, C features were added to the C++ language to make every C program compatible with C++ compilers.
Wrong.
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- Antoine de Saint-Exupery
This response really fails the Ranch's Be Nice policy test. Not only is a one word answer rude, but you offer no justification, citation, or explanation as to why you think the earlier posting is not grounded and correct.
Jimmy Clark wrote:For marketing purposes and to ease and promote adoption from existing C programmers and their programs, C features were added to the C++ language to make every C program compatible with C++ compilers.
Wrong.
To add a bit of context, for those who recall... remember that the first C++ compiler from Bell Labs wasn't a compiler at all, but was done with the C preprocessor. So you can state that the first C++ compiler was compatible with C, because it *was* the C compiler doing the C++ compilation.
[edit: A bit more clarification. It was done with a modified C preprocessor -- but the C compiler did all the compilation]