GCC is re-implementing in C++ and C discarded

C

Chicken McNuggets

*Objective C would have a similar high level of C compatibility as
C++, for example, but I think you'd be hard pressed to consider that
as sufficiently mainstream.

I'm not so sure. Objective-C is growing in popularity all the time. It
has the advantage that any valid C program is a valid Objective-C
program and can also use C++ classes directly via Objective-C++. Sounds
like a win / win situation to me.
 
F

fmassei

Il 8/23/2012 3:49 PM, Chicken McNuggets ha scritto:




That doesn't prove that Objective-C is as popular outside the Apple world.

Given this data, I'd say that the Apple-world is more popular than C++

Ciao!
 
R

Rui Maciel

Chicken said:
According to the Tiobe language index for August 2012 it is the third
most popular language (ahead of C++).

http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html


That index is meaningless. For example, it tries to account the popularity
of a given programming language by counting the number of videos on youtube
that pop out on a given search.

http://www.tiobe.com/index.php/content/paperinfo/tpci/tpci_definition.htm


Meanwhile, a search on sourceforge for C++ returns 1632 results[1], while a
search on Objective C returns 66[2].


Rui Maciel

[1] http://sourceforge.net/directory/language:c++/
[2] http://sourceforge.net/directory/language:objective-c/
 
R

Rui Maciel

Given this data, I'd say that the Apple-world is more popular than C++

It may be more popular in youtube and in a set of random blogs, but that is
meaningless and it isn't exactly what a programming language is for.


Rui Maciel
 
K

Kenny McCormack

It may be more popular in youtube and in a set of random blogs, but that is
meaningless and it isn't exactly what a programming language is for.

I'm curious exactly how you would answer the question (below) if you were
being perfectly honest and not trying to impress anyone on Usenet.

Q: What exactly do we mean when we say that language A is more "popular"
than language B?

--
Is God willing to prevent evil, but not able? Then he is not omnipotent.
Is he able, but not willing? Then he is malevolent.
Is he both able and willing? Then whence cometh evil?
Is he neither able nor willing? Then why call him God?
~ Epicurus
 
K

Kenny McCormack

Kenny McCormack said:
Q: What exactly do we mean when we say that language A is more "popular"
than language B?

I suggest that the most common interpretation of this question is:

Q: What language should I study in school to maximize my chances of getting
a job?

--
Given Bush and his insanely expensive wars (*), that we will be paying for
for generations to come, the only possible response a sensible person need
ever give, when a GOPer/TeaBagger says anything about "deficits", is a
polite snicker.

(*) Obvious money transfers between the taxpayers and Bush's moneyed
interests. Someday, we'll actually figure out a way to have a war where the
money just gets moved around and nobody (on either side) gets injured or
killed. That will be an accomplishment of which we will be justly proud.
 
M

Melzzzzz

On 22/08/2012 21:45, BartC wrote:

[..]
It's no surprise that there might be better languages for
implementing compilers with than C. Especially with much faster
hardware now that allows more productive languages to be used.

But I wouldn't have chosen C++..

Don't forget that GCC itself is a set of programs that need to run
"reasonably fast". It would take very long to compile the QT
libraries if GCC was implemented in any scripting language. C++
seems to offer the best compromise between abstractions and
performance.

I don't know. There are plenty of fast languages that are not C or
C++. Haskell strikes me as an interesting language that is both "fast
enough" and extremely expressive.

Haskell fast? Well, it provides C strings and such but language
is inherently *slow*.
Java is much faster than Haskell for example...
 
M

Melzzzzz

I'm not so sure. Objective-C is growing in popularity all the time.
It has the advantage that any valid C program is a valid Objective-C
program and can also use C++ classes directly via Objective-C++.
Sounds like a win / win situation to me.

What are advantages of Objective C over C++?
 
M

Melzzzzz

On Thu, 23 Aug 2012 08:43:39 -0700 (PDT)
Given this data, I'd say that the Apple-world is more popular than C++

Ciao!

What Objective C applications exists on other platforms except
apple?
 
M

Malcolm McLean

בת×ריך ×™×•× ×—×ž×™×©×™, 23 ב×וגוסט 2012 18:42:54 UTC+1, מ×ת Kenny McCormack:
Q: What exactly do we mean when we say that language A is more "popular"
than language B?
We don't mean anything exactly. There are several metrics which could could
use and defend. The number of programmers using the language, the number of
lines of code in existence, the number of programs written in the language,the
number of programmer hours spent with the language, the number of paid
programmer hours, the number of voluntary programmer hours (with few external
pressures to use other languages).
But most of these will give similar results.
 
M

Melzzzzz

Actually, Haskell competes quite well with Java on the Programming
Language Shootout.

http://shootout.alioth.debian.org/u64q/benchmark.php?test=all&lang=all

GHC can compile either to native code, or to C.

Well, those are just small benchmarks tweaked to perfection.
I have tried Haskell some years ago and found it much more difficult
than C++ to master and write satisfying applications in time.
You have to be real guru to write satisfying Haskell code.
I mean idea that everything is constant is good in theory
but in practice you have to dig in "non safe" code and
to write against functional spirit in order to finish job,
and for that task Haskell is too complicated IMO.
 
N

Nick Keighley

Of course, there are already a number of good C based compiler
offerings, depending on what you are looking for, so I don't think
that people who are religious about using C for their compiler have
to worry that much. PCC comes to mind, as well as OpenWatcom, which,
I think, is implemented in C.

this whole conversation strikes me as bizzare. A kind of level
confusion. It reminds of one of my collegues who came out with "C++ is
upwards compatible with C because it is implemented in C" and couldn't
see what was wrong with that statement.

(I'll accpt that some people porting a compiler might care what it was
implemented in)
 
L

Les Cargill

David said:
Whereas real programmers work in C, but we don't sit around all day
talking about it...


More accurately, "real" programmers probably don't discuss their
programming languages in the sorts of places that Tiobe looks at, such
as facebook. If they looked at newsgroups or sites like Stackoverflow,
they might get different results.


Even Stackoverlfow et al have significant bias towards the newer
languages. Because, well, they're newer. We*/I have looked
hard at Objective C three times in the last twenty years or so, but
ended up not using it for the usual path dependent reasons.

*whoever that was at the time...
 
S

Steven G. Kargl

On 8/24/2012 5:15 AM, Nick Keighley wrote:
[...]
this whole conversation strikes me as bizzare. A kind of level
confusion. It reminds of one of my collegues who came out with "C++ is
upwards compatible with C because it is implemented in C" and couldn't
see what was wrong with that statement.

"Assembler must be upwards compatible with C, because 'as' is written in C."

"FORTRAN must be upwards compatible with C, because gnu FORTRAN is written
in C." (I think.)

The name of the language is "Fortran". It's been Fortran since
the Fortran 1990 standard.

The GNU Fortran frontend is written in C. Some of the GNU
Fortran runtime is written in m4. The m4 files when processed
generates Fortran code. The Fortran code is then compiled by
GNU Fortran.
 
J

Jorgen Grahn

On 23/08/2012 21:15, Melzzzzz wrote: ....

Well, if you like C++'s hideous template syntax, you'll just /love/
objective C's message passing syntax!

I don't know Objective C, but what's so hideous about the former?
Apart from the fact that (), [] and {} were used up so it had to
reuse <>?

/Jorgen
 
J

Jorgen Grahn

When any major program moves from C to another language it's something of a
disappointment to regs of this newgroup. Particularly when it's the compiler
in which a lot of C programs themselves are compiled.
But it's an outlier. The general trend is that C++ use is down, C use is
holding up.

Speaking as someone who really prefers C++ to C nowadays, and C to all
other languages for many uses:

If that is true, it should worry C programmers.

C++ really /is/ the "better C" in the sense that like C it
- works for low-level code
- works in environments with little runtime support
- is compatible with C libraries and interfaces.
but allows you to make your design more clearly reflected in the code.

There are no other important languages in that area. And the area /is/
important -- I've made my living in it in since '96, and things like
most Unix software are based on it.

So, even if you're happy with C, and see it "hold up", it should worry
you if the path forward is declining.

It's not as if other interesting things are happening in the C area.
And the C programmers I meet are generally unskilled. Not stupid or
unable to make things work -- just undereducated in topics like the C
language itself, debugging, and how to write large-scale maintainable
code.

/Jorgen
 
J

Johannes Bauer

If that is true, it should worry C programmers.

C++ really /is/ the "better C" in the sense that like C it
- works for low-level code
- works in environments with little runtime support

You clearly do *not* write low-level code.

Pre-initialized structures, which C provides, are for some architectures
I'm working in a *MUST*, since they determine the interrupt vector table
which gets transferred to C. C++ just does not offer this. Referring to
the Cortex-M3 and -M4 series here, for example (where the initial stack
pointer and the IVT are placed in the start of flash).

In fact I wrote a library to conveniently and efficiently address
low-level registers of a MCU using c++0x features, so access to
bitfields is truely typesafe (class enums!). This works nice and well,
but for other parts, C is still a must because C++ just doesn't cut it.

Regards,
Johannes

--
Zumindest nicht öffentlich!
Ah, der neueste und bis heute genialste Streich unsere großen
Kosmologen: Die Geheim-Vorhersage.
- Karl Kaos über Rüdiger Thomas in dsa <[email protected]>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top