• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Who uses C these days, and why?

 
author
Posts: 9035
21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The C programming language remains fairly popular...

What's it being used for these days?
 
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I do, because I've got no choice in the matter . Maintaining a legacy system.
 
author
Posts: 23923
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.

Henry
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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++.
 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
C can also be used to program iPhone applications especially in Gaming.
 
Bartender
Posts: 1098
19
Mac OS X IntelliJ IDE Oracle Spring VI Editor Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!

 
Bert Bates
author
Posts: 9035
21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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."
 
Hussein Baghdadi
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Henry Wong
author
Posts: 23923
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.

Henry
 
Hussein Baghdadi
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Rancher
Posts: 4686
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Hussein Baghdadi
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Pat Farrell
Rancher
Posts: 4686
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
Master Rancher
Posts: 4222
57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I consider Mandarin Chinese a complete failure. Sure, its widely used still, but not by me.
 
author and iconoclast
Posts: 24204
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mike Simmons wrote:I consider Mandarin Chinese a complete failure. Sure, its widely used still, but not by me.



I love those little oranges though.
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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...)
 
Pat Farrell
Rancher
Posts: 4686
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good that the post was not "Who uses Java these days"
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Pat Farrell wrote:I will also claim that we professionals have failed by not kicking C++ to the junkyard of obsolete languages at least 15 years ago.



That begs for a whole new topic.
 
Ranch Hand
Posts: 129
Firefox Browser Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For real time mission critical applications in domains like aeuronotics ,radar ,avionics etc C is the preferable one and still using
 
Bartender
Posts: 1205
22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.

 
Pat Farrell
Rancher
Posts: 4686
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 1283
Netbeans IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Marshal
Posts: 75861
361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Pat Farrell wrote: . . . Smalltalk was the first OO language. . . .

Are you sure about that?

According to Wikipedia, Smalltalk was developed in the 1970s, whereas according to Bertrand Meyer (Object-Oriented Software Construction) Simula-67 was object-oriented in 1967.
 
Pat Farrell
Rancher
Posts: 4686
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Are you sure about that?


You take Wikipedia as a source?

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
Marshal
Posts: 75861
361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Ranch Hand
Posts: 138
Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).
 
Kaustubh G Sharma
Ranch Hand
Posts: 1283
Netbeans IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Rancher
Posts: 280
VI Editor C++ Debian
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Pat Farrell
Rancher
Posts: 4686
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Anand Hariharan wrote:Wrong.


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.
 
Peter Rooke
Bartender
Posts: 1098
19
Mac OS X IntelliJ IDE Oracle Spring VI Editor Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've read that C was a April Fools Joke!
 
Kaustubh G Sharma
Ranch Hand
Posts: 1283
Netbeans IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
they can't be seroius
 
Henry Wong
author
Posts: 23923
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Anand Hariharan wrote:

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]

Henry
 
Kaustubh G Sharma
Ranch Hand
Posts: 1283
Netbeans IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey that's interesting fact..I didn't knew it..thanks henry
 
Peter Rooke
Bartender
Posts: 1098
19
Mac OS X IntelliJ IDE Oracle Spring VI Editor Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

they can't be seroius


The articial was dated: "COMPUTERWORLD 1 April"


when we got a clean compile on the following syntax:
for(;P("\n"),R--;P("|"))for(e=C;e--;P("_"+(*u++/8)%2))P("| "+(*u/4)%2);


 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic