Author Topic: C into the future  (Read 5473 times)

Richly

  • Guest
C into the future
« on: August 08, 2016, 11:11:18 PM »
This is what TIOBE have to say this month about the C programming language

Quote
The C programming language has a score of 11.303%, which is its lowest score ever since we started the TIOBE index back in 2001. One of the main reasons for this drop is that C is hardly suitable for the booming fields of web and mobile app development. Moreover the C programming language doesn't evolve like the other big languages such as Java, C++ and C#. There is a "new" C11 standard available but this contains only minor changes. The constraint that C object code should remain small and fast doesn't help here. Moreover, adding C++ like features is also out of the picture because that's what C++ is for already. So C is a bit stuck. Yet another reason why C is getting into trouble is that there is no big company promoting the language. Oracle supports Java, Microsoft supports C++, C# and TypeScript, Google supports Java, Python, Go, Dart and JavaScript, Apple promotes Swift and Objective-C, etc. but none of them supports C publicly.

I don't know. Although there may be some truth in what they say, it seems a bit pessimistic to me.

They state that C "doesn't evolve like the other big programming languages" as if that should always be considered to be a problem. There are however be a lot of programs out there written in C, many of them quite old; constantly 'evolving' the language would create backward compatibility issues for a lot of software. The new C11 standard "contains only minor changes"; no doubt because not much needed to be changed!! If it ain't broke...

Worse, the article suggests that one of the reasons for this lack of evolution (stability I would call it) is the '"constraint that C object code should remain small and fast". I'm not entirely sure I would consider this to be a 'constraint'!

The logic of their argument seems to be, taken to the extreme, that the language should constantly change thereby creating backward compatibility issues and, in order to help this along, it should be open to becoming big and slow!

C may well have it's lowest popularity score on the TIOBE Index since 2001 but it is still at number 2 and more popular than all those other languages the article mentions, except Java, which can hardly be described as "getting into trouble". So, neither Microsoft, Google nor Apple supports C. Well, somebody does because it remains at number 2 in the index.

Okay, so C may well not be the most suitable language for mobile and app development and this is a growing area; but C is and remains suitable for many many other tasks: the right tool for the right job...

wang renxin

  • Guest
Re: C into the future
« Reply #1 on: August 09, 2016, 01:13:39 AM »
I think one reason that few people consider C a preferred web and mobile development language is it's hard to write applications from scratch, so people use other popular languages as enhanced and reformative C. But they can't deny C is the most popular language for open source communities. C is the base of web and mobile environment.

n00b

  • Guest
Re: C into the future
« Reply #2 on: August 09, 2016, 02:27:50 AM »
Comparing C to languages like Java or C# is kind of pointless. C really can't be used efficiently for interfacing with a lot of modern day web frameworks. But C can't be replaced by any of the languages that are used for such task because C is still the best at what it does, which is the development of low-level, often resource intensive task. If you implemented the same algorithm for something like a game engine a parser, C is going to beat Java, Python, C#, or any of the other popular languages everytime. The only way you could squeeze out more speed in your application is to write it in assembly. But I am pretty sure most modern C compilers can produce more optimized code than we can by this point.

Tomaaz

  • Guest
Re: C into the future
« Reply #3 on: August 09, 2016, 08:52:24 AM »
TIOBE again? Really?

EDIT Nowadays, any general "programming languages popularity" ranking is pointless. Only specific ones make sense. Languages for OSes development, languages for web development, general programming scripting languages, programming languages used in business, programming languages for mobile development, programming languages for education etc. But comparing C, PHP and Scratch in one ranking is just a waste of time.
« Last Edit: August 09, 2016, 09:01:23 AM by Tomaaz »

ScriptBasic

  • Guest
Re: C into the future
« Reply #4 on: August 09, 2016, 09:04:05 AM »
Quote
C really can't be used efficiently for interfacing with a lot of modern day web frameworks.

WTF

What language do think operating systems and most of API libraries are written in?

That doesn't count as framework?

Tomaaz

  • Guest
Re: C into the future
« Reply #5 on: August 09, 2016, 11:27:42 AM »
Quote
C really can't be used efficiently for interfacing with a lot of modern day web frameworks.

WTF

What language do think operating systems and most of API libraries are written in?

That doesn't count as framework?

"Efficiently" is a key word here. Popularity rankings are not about "it is possible..." or "you could do it...". They are about the best tools for the job. Of course it's possible to do in C everything my eight years old son does with Scratch, but don't tell me you can't see the difference here.

Aurel

  • Guest
Re: C into the future
« Reply #6 on: August 09, 2016, 12:11:06 PM »
Haa  ;D
do you can anything with python what you can with php
do you can learn programming better with python or basic or with C
Haa...  :D

Tomaaz

  • Guest
Re: C into the future
« Reply #7 on: August 09, 2016, 12:25:00 PM »
do you can anything with python what you can with php

Yes. You can do with Python everything you can do with PHP. And a lot more. :)

o you can learn programming better with python or basic or with C

1. Scratch
2. Python
3. The rest

:)

n00b

  • Guest
Re: C into the future
« Reply #8 on: August 09, 2016, 02:13:38 PM »
Quote
    C really can't be used efficiently for interfacing with a lot of modern day web frameworks.


WTF

What language do think operating systems and most of API libraries are written in?

That doesn't count as framework?

Of course C can do anything any other programming language can do. However, when working on something like facebook, twitter, or plugins for wordpress, you would probably want to use languages that are suited for such task. You could write an entire web page in C but why would you. Since HTML and PHP are already accepted for building interfaces and designs for websites and HTML can't directly import C code, why not use a language that can easily work with HTML, CSS, or PHP to generate dynamic scripts? This saves time and makes your code more readable by a majority of people who maintain the code for webpages. I am not saying these languages are better than C or worse than C. It would be like saying a hammer is better than a screw driver. They are different tools designed for different task.

Aurel

  • Guest
Re: C into the future
« Reply #9 on: August 09, 2016, 04:45:33 PM »
And a lot more...
..must be some kind of dark magic  ;D
and that is why PHP used much more that python
python is nothing else than one BIG lie and new py3 is special piece of crap ;D

well this is old story so who care  :P
« Last Edit: August 09, 2016, 04:48:24 PM by Aurel »

Tomaaz

  • Guest
Re: C into the future
« Reply #10 on: August 09, 2016, 05:27:28 PM »
And a lot more...
..must be some kind of dark magic  ;D

Try to create a GUI desktop program in PHP. Or simple 2D game. Equivalent of SciPy? Good luck. :)

and that is why PHP used much more that python

PHP is used more, but only in one area (web development). It doesn't exist outside the web. Everybody knows that. Od course, apart from you. :)

python is nothing else than one BIG lie...

Are you suggesting that Python 3 doesn't exist? This conspiracy theory is much more interesting. :)

n00b

  • Guest
Re: C into the future
« Reply #11 on: August 09, 2016, 07:04:37 PM »
And a lot more...
..must be some kind of dark magic  ;D

Try to create a GUI desktop program in PHP. Or simple 2D game. Equivalent of SciPy? Good luck. :)

and that is why PHP used much more that python

PHP is used more, but only in one area (web development). It doesn't exist outside the web. Everybody knows that. Od course, apart from you. :)

python is nothing else than one BIG lie...

Are you suggesting that Python 3 doesn't exist? This conspiracy theory is much more interesting. :)

I have to comment on this. PHP can't be used to create dynamic applications. PHP code is processed before the webpage even loads. It does not run in the background of a webpage like python or javascript. So comparing PHP to python is not really a fair comparison at all. I absolutely hate Python but I will admit that it can do a lot of things PHP can't simply because the python interpreter can continue running in the background of a webpage where as once you see a webpage, PHP is already done. I think it would be better to compare PHP to HTML as they both are used for the same thing. With web development, you will have PHP or HTML generate the interface, then PHP can be used to initialize or send and get data from a data base along with initializing a dynamic script written in a language such as python, javascript, etc. You could also generate the interface through python itself, but if this is the case you would more than likely end up calling that script from inside HTML. Web and mobile development is somewhat confusing in the fact that you will generally always be using more than one language for a complete app. Although with stuff like node and rails, you could limit front and back end development to a single language for most task.

jj2007

  • Guest
Re: C into the future
« Reply #12 on: August 09, 2016, 09:36:29 PM »
C is going to beat Java, Python, C#, or any of the other popular languages everytime. The only way you could squeeze out more speed in your application is to write it in assembly. But I am pretty sure most modern C compilers can produce more optimized code than we can by this point.

C is slower than assembly. That C compilers can beat assembly is an urban legend, most of the time hand-crafted assembly is twice as fast, or faster, than corresponding CRT algos.

Besides, C is often clumsier than modern assembly code. It is as low level as assembly, but less transparent and therefore more dangerous. Plus, all the {stupid} [brackets] 8)

Tomaaz

  • Guest
Re: C into the future
« Reply #13 on: August 09, 2016, 10:28:31 PM »
I have to comment on this. PHP can't be used to create dynamic applications.

PHP is used to create dynamic websites. It has nothing to with dynamic elements you see in your browser (these are coded in JavaScript). Static website is simply a ready to use static HTML/CSS/JavaScript document that is send to the browser. Dynamic website means that this document is being created by the script written in one of the server-side scripting languages (for example PHP, Ruby or Python) and then send to the browser.

PHP code is processed before the webpage even loads.

PHP script generates the website (HTML/CSS/JavaScript) and send it to the browser. It works server-side.

It does not run in the background of a webpage like python or javascript. So comparing PHP to python is not really a fair comparison at all.

Python also doesn't. It works the same way PHP does. Only JavaScript run in the background of a webpage displayed in the browser.

I think it would be better to compare PHP to HTML as they both are used for the same thing.

Absolutely not! HTML is interpreted by a browser, while PHP generates HTML document on the server and send it to the browser to be interpreted. They are not used for the same thing.

With web development, you will have PHP or HTML generate the interface

PHP generates on the server HTML/CSS/JavaScript document that, after being interpreted by a browser, becomes what you see on the screen. The same document can be generated by any other server-side language or can be simply upload on the server. There is no website without HTML. There can be website without PHP.

initializing a dynamic script written in a language such as python, javascript, etc.

If you mean client-side scripting it is only JavaScript.

You could also generate the interface through python itself, but if this is the case you would more than likely end up calling that script from inside HTML.

Not true. Python would work the same way PHP does. It would generate HTML document and send it to the browser.

Web and mobile development is somewhat confusing in the fact that you will generally always be using more than one language for a complete app. Although with stuff like node and rails, you could limit front and back end development to a single language for most task.

With Node.js - yes. JavaScript would be used for both server and client side scripting. With Rails - no. Ruby cannot be used for clent side scripting. It works only on the server side.