aspose file tools*
The moose likes Meaningless Drivel and the fly likes Who uses C these days, and why? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Other » Meaningless Drivel
Bookmark "Who uses C these days, and why?" Watch "Who uses C these days, and why?" New topic
Author

Who uses C these days, and why?

Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8883
    
    5
The C programming language remains fairly popular...

What's it being used for these days?


Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 4465
    
    8

I do, because I've got no choice in the matter . Maintaining a legacy system.
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18990
    
  40


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


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
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
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14347
    
  22

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++.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

C can also be used to program iPhone applications especially in Gaming.
Peter Rooke
Ranch Hand

Joined: Oct 21, 2004
Posts: 805

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: 8883
    
    5
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
Bartender

Joined: Nov 08, 2003
Posts: 3479

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
Sheriff

Joined: Sep 28, 2004
Posts: 18990
    
  40

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
Bartender

Joined: Nov 08, 2003
Posts: 3479

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
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.


Regards,
Avishkar Nikale
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14347
    
  22

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.
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

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
Bartender

Joined: Nov 08, 2003
Posts: 3479

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

Joined: Aug 11, 2007
Posts: 4659
    
    5

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
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
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: 3018
    
  10
I consider Mandarin Chinese a complete failure. Sure, its widely used still, but not by me.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

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.


[Jess in Action][AskingGoodQuestions]
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

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
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

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.
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9519
    
    2

Good that the post was not "Who uses Java these days"


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

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.


GenRocket - Experts at Building Test Data
vijin das
Ranch Hand

Joined: Jun 07, 2010
Posts: 129

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: 1012
    
    3
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

Joined: Aug 11, 2007
Posts: 4659
    
    5

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.
Kaustubh G Sharma
Ranch Hand

Joined: May 13, 2010
Posts: 1281

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: 39834
    
  28
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

Joined: Aug 11, 2007
Posts: 4659
    
    5

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
Sheriff

Joined: Oct 13, 2005
Posts: 39834
    
  28
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.
Mihai Lihatchi
Ranch Hand

Joined: Oct 28, 2005
Posts: 138

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.
Kaustubh G Sharma
Ranch Hand

Joined: May 13, 2010
Posts: 1281


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.
Anand Hariharan
Rancher

Joined: Aug 22, 2006
Posts: 257

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
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

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
Ranch Hand

Joined: Oct 21, 2004
Posts: 805

I've read that C was a April Fools Joke!
Kaustubh G Sharma
Ranch Hand

Joined: May 13, 2010
Posts: 1281

they can't be seroius
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18990
    
  40

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

Joined: May 13, 2010
Posts: 1281

hey that's interesting fact..I didn't knew it..thanks henry
Peter Rooke
Ranch Hand

Joined: Oct 21, 2004
Posts: 805

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);

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Who uses C these days, and why?