

C in Danger (and thus Higher-Level Languages?) - chanux
http://jakob.engbloms.se/archives/1131?owa_from=feed&owa_sid=

======
tetha
I think the comments and the article confuse two things.

(1) C is in danger of actually dying, as in: going away (2) C is in danger of
losing some share of application development.

I think #1 is just not true. Almost every close-to-metal programming uses C.
Yes, it is true that not many developers do this close-to-metal programming
(which would include kernel development, driver development and embedded
development), however, this close-to-metal development is very, very
important, because it is the foundation to all application development. And at
the moment, C and C++ are the foundation to the close-to-metal programming.
Thus, C and C++ are pretty much the foundation of application development.
Maybe hidden, but certainly alive and important.

On the other hand, C has already lost a lot of shares in application
development, if you define application as some custom buissness application,
maybe web-based, maybe gui-based and I certainly agree that C will lose more
shares in this area. And I have to say, this is a good thing. The focus for C
is just different from the focus one needs for such application development,
because for higher level application development, maintainability and
extensibility are more important than using every cpu cycle and every memory
byte to the most effect.

tl;dr: In my opinion, C is a small important layer in the stack and not in
danger in the area C was made for.

------
mattj
Objective-C is C plus brackets and a recv message function. Everything else is
built up on that. You can very easily use c libraries in iPhone / iPad
development.

Maybe this is true on android, but iPhone is a great platform for c
programmers.

~~~
rbanffy
ANSI C code is perfectly legal Objective-C code.

~~~
brianobush
so I can just run my regular code in Obj-C and it should work with minimal
boiler plate? I guess the barrier to iphone dev isn't as high as I was
imagining.

~~~
pyre
Objective-C is _much_ closer to the 'just a pre-processor on top of C' idea
than C++ is at this point. ANSI C is still valid, though to hook into Apple's
CocoaTouch APIs I believe that you will be forced to write ObjC.

~~~
ryanpetrich
You can use plain C, it's just not pretty:

void *result = objc_msgSend(target, sel_registerName("message:"), argument);

~~~
rbanffy
Mind you: not pretty, even for C standards ;-)

------
stcredzero
I think that Apple should find a way to certify languages that expose all of
the iPhoneOS APIs without an excessive penalty for runtime footprint. So long
as all of the APIs are exposed in an easily used fashion, then it just becomes
another way to code on the iPhone and Apple remains in control.

This would enable languages/environments like Scheme and Mono to operate on
the iPhone.

~~~
wmf
I think Apple would only be happy if those environments exposed _all future
APIs on the day they are released_ , which is a very difficult promise to
make.

~~~
cpr
If they would use some kind of dynamic introspection, building on the
Objective-C runtimes, they could.

------
robot
Another article that sees only the high-level side of software development and
comes to wrong conclusions.

C is going to be there _universally_ until the cpu hardware changes
dramatically, such that it maps one to one to some other language. That's
where the universality is coming from. C maps directly to what cpu
understands.

~~~
cpr
Yep, C is pretty much the universal assembly language with some sugar on top.

------
kentosi
Towards the latter portion of the article he talks about cross-platform
development. Though I agree that this would somehow get reduced, I can't help
but feel that this would also have some good points.

The write-once, run-anywhere ideals have only applicationst hat work
beautifully on the original platform they were developed on, and poorly on
others (eclipse on mac, skype (before they re-wrote it for mac), itunes on
windows, etc.)

I'm all for nativeness.

------
jacquesm
Without further analysis or background, just looking at the figures and the
ordering it would appear to me that that table is incorrect in several ways at
least.

Pascal usage greater than actionscript? Delphi on the rise and javascript
dropping? Python dropping? Go already larger than actionscript?

I don't buy any of that.

~~~
billswift
Where did you see the table and stats you are talking about? There were
neither in the linked essay.

------
s3graham
Any recommendations for fleshed out languages/tools that can export to ObjC
(ignoring 3.3.1 for now), Java, and C#?

I suppose the easiest version is a Blub that does only what they all can
easily do language-wise and mobile-API-wise.

edit: HA <http://xmlvm.org/overview/> I just tasted some throw-up.

------
lutorm
It seems a little funny to claim that C is in decline because of Android,
since the Linux kernel most definitely is C.

But I was very disappointed when I checked out the Android SDK the other day
and noted that it required me to use Java.

~~~
pgbovine
_since the Linux kernel most definitely is C._

how many people do you know who write kernel (or other low-level OS code)? i
think there are now more and more devs writing apps than systems code, which
means a rise in the use of higher-level languages (just my wild speculation)

------
jheriko
C should die, but only when a better alternative is available...

~~~
billswift
I don't see C dying until we have computers with radically different
architectures. C is too good a fit for current computers and there is too much
installed base and too much cost for conversion for things to be switched over
until it is _really_ necessary.

------
rayvega
Quite the opposite:
[http://www.tiobe.com/index.php/content/paperinfo/tpci/index....](http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html)

~~~
eande
that search result has been questioned by many, see
<http://news.ycombinator.com/item?id=1341553>

------
itistoday
The premise is that because Windows Mobile does not allow, and Android makes
it very difficult to run C code, that therefore "C might be on a decline as
the universal programming language." (He incorrectly states that the iPhone
"only" allows Objective-C). That's not very convincing.

Until Apple, Microsoft, Google and others start writing their operating
systems in Java/C# instead of C, I wouldn't worry.

~~~
Avshalom
Microsoft did write their an OS in C# though, and who knows, it might rear
it's head again someday.

~~~
contextfree
They are still attempting to do this with Midori:
<https://careers.microsoft.com/JobDetails.aspx?jid=8160>

"The Technical Strategy Incubation team is looking for a senior software
architect to lead development of the Kernel for a novel operating system.
Because this is an incubation, the candidate must have a high tolerance for
uncertainty. Experience in startups is a plus.

Our Kernel is a non-traditional design divided between a native C++
microKernel and additional managed C# operating system functionality which is
injected into each independent hardware address space. The system uses
lightweight isolation and capabilities as the basis for security, is built
from the ground up for safe concurrency, and enforces unusual principles like
"no unsafe shared memory." ..."

~~~
_delirium
You can currently download Singularity, which works but isn't polished enough
or Windows-compatible; Midori's rumored to be a project to adapt Singularity
into something that could become a future version of the Windows product
(though there are also other rumors).

<http://singularity.codeplex.com/>

