By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,986 Members | 2,030 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,986 IT Pros & Developers. It's quick & easy.

Is necessary to switch to C++ or some object-oriented language?

P: n/a
Hi fellows,

I am reading some books to learn the C programming language, and
sometimes I have the feeling that when somebody becomes a C expert, he
must learn a more modern and object-oriented language.

When I read things like "... C++ is an evolution of C ..." or "... C
is a subset of C++ ..." I tend to believe that I will have to learn C+
+ sooner or later. It sounds like C++ is the future and C is the past
(and will be no longer useful anytime soon).

And how about the other object-oriented language: Java. They say it is
very powerful and it seems to be everywhere.

So, I started to ask myself...

Is object-oriented better?
Is necessary to switch to C++ or some object-oriented language?
Is it true that C tends to be decreasingly used?
And finally ... why do people need object-oriented languages?

I am sorry for making so many questions.

Thank you all,

Arnaldo

Mar 21 '07 #1
Share this Question
Share on Google+
46 Replies


P: n/a
On Mar 20, 10:18 pm, ajb...@gmail.com wrote:
Hi fellows,

I am reading some books to learn the C programming language, and
sometimes I have the feeling that when somebody becomes a C expert, he
must learn a more modern and object-oriented language.

When I read things like "... C++ is an evolution of C ..." or "... C
is a subset of C++ ..." I tend to believe that I will have to learn C+
+ sooner or later. It sounds like C++ is the future and C is the past
(and will be no longer useful anytime soon).
C++ is a fork in the language tree. C is not a subset of C++.
And how about the other object-oriented language: Java. They say it is
very powerful and it seems to be everywhere.
Java is very powerful and it is everywhere. It's a great thing to
write GUIs in.
So, I started to ask myself...

Is object-oriented better?
For some things it is.
Is necessary to switch to C++ or some object-oriented language?
No, it isn't.
Is it true that C tends to be decreasingly used?
I doubt it. Most of the C code will be in embedded applications. I
doubt if people will start writing most of their "toast pop-up
instructions" in C++ instead of C. C is designed for filter type
applications and the UNIX metaphor of doing things. It works fairly
well even with large tasks like operating systems (e.g. Linux) and
database systems (e.g. PostgreSQL).
And finally ... why do people need object-oriented languages?
Because they are more comfortable with an object model.
I am sorry for making so many questions.
Fortran and Cobol were both invented around 1950. Both are going
strong. If a language is useful, it survives and evolves.
I predict that most business code will still be in Cobol 25 years from
now.

Mar 21 '07 #2

P: n/a
aj****@gmail.com wrote:
I am reading some books to learn the C programming language, and
sometimes I have the feeling that when somebody becomes a C expert, he
must learn a more modern and object-oriented language.
I am starting to find more apps are going to c++ in the linux world
although gtk apps are still mostly in C. And of cause there are still
tons of librarys and system stuff that is still written in c.

The c++ apps are probably c++ because there are more c++ toolkits.
e.g. qt, wx widgets, fltk, fox toolkit etc.
When I read things like "... C++ is an evolution of C ..." or "... C
is a subset of C++ ..." I tend to believe that I will have to learn C+
+ sooner or later. It sounds like C++ is the future and C is the past
(and will be no longer useful anytime soon).
I am still fine tuning my c skills and often wonder if I would be
better off doing c++. Not sure about this as I still like the idea of
c although c++ does seem to have some things I would like to use.

I think that I will end up learning c++ as there are a number of
projects using it and I am mainly learning c to work on free software
projects.

kind regards,
Anthony Irwin
Mar 21 '07 #3

P: n/a
aj****@gmail.com wrote:
Hi fellows,

I am reading some books to learn the C programming language, and
sometimes I have the feeling that when somebody becomes a C expert, he
must learn a more modern and object-oriented language.
You should know a number of languages in order to have the right tools
for any particular task. C is as "modern" a language as you could want.
Even so, assuming "modern" means something positive is an error.
Object-oriented programming is well within the capabilities of C. There
are many object-oriented languages, and some are better than others.
When I read things like "... C++ is an evolution of C ..."
While true, it is a vacuous thing to say. Remember that the fact that
one thing evolved from another does not make it better. Don't let that
piece of religious mysticism cloud your mind. And the C that C++
"evolved" from was older than the *old* standard C (ANSI C89 or ISO C90)
or the current standard C (ISO C99). Standard C and C++ both evolved
from the same base language on different paths. So what?
or "... C
is a subset of C++ ..."
And that one is a lie.
I tend to believe that I will have to learn C++
sooner or later.
Why should an irrelevant statement and an outright lie lead you to
believe anything?
It sounds like C++ is the future and C is the past
(and will be no longer useful anytime soon).
And that is just silly.
And how about the other object-oriented language: Java. They say it is
very powerful and it seems to be everywhere.

So, I started to ask myself...

Is object-oriented better?
Not necessarily.
Is necessary to switch to C++ or some object-oriented language?
Not necesssrily.
Is it true that C tends to be decreasingly used?
No.
And finally ... why do people need object-oriented languages?
Mainly to know the buzzwords the job interviewers know.
Mar 21 '07 #4

P: n/a
On Mar 21, 10:18 am, ajb...@gmail.com wrote:
Hi fellows,
Hi, i still a newbie but the difference is that i live with
programmers, here on comp.lang.c, rather than with academics. so take
my advice with a "grain of salt"

:-)
I am reading some books to learn the C programming language, and
sometimes I have the feeling that when somebody becomes a C expert, he
must learn a more modern and object-oriented language.
that shows that you are a PURE newbie, you need to throw away that
kind of feeling, it happened to me many times and it will waste yours
lots of time by putting you into lots of thinking instead of lots of
coding.

i speak from experience. you need to solve problems by coding, you do
not need another language. trust me.

When I read things like "... C++ is an evolution of C ..."
i will correct it:

"... C++ is a specially desired inherent complex evolution of C ..."

or "... C is a subset of C++ ..."
complete NON-SENSE

i tried C++ for 4 months, never been able to learn it and now i am
learning C from K&R2. it is a completely different experience of
solving problems.
I tend to believe that I will have to learn C+
+ sooner or later. It sounds like C++ is the future and C is the past
(and will be no longer useful anytime soon).
in corporate world, C++ is being used at many places today. e.g. in my
country (India), if you search for C jobs,you will get very few but
for C++, Java or .NET you will get loads of hits on monsterindia.com,
naukri.com, clickjobs.com

but i need to mention that corporate world do NOT use good tools to
solve problems. they use the FADs most of the times.

And how about the other object-oriented language: Java. They say it is
very powerful and it seems to be everywhere.
which "everywhere" you are referring to:

corporate - yes
UNIX culture - definitely NO
GNU tools - definitely NO
schools - yes
as is said, if a language is used everywhere, it doe snot mean it is
good, may be it is good but most of the times, it is not.

Is object-oriented better?
sometimes and not some other times. OOD is a method of solving
problems by coding, so is procedural, logic, declarative, functional
and generic programming.

every method(or paradigm, or style) is good for solving some problems
but bad for others, OOD is not an exception here.
Is necessary to switch to C++ or some object-oriented language?
for Job, YES you have to
for your business may be, may be not

Is it true that C tends to be decreasingly used?
"decreasingly used" where corporate, schools, research etc.

in corporate yes but still you need C for that because you will always
come across with C code when working as a C++ software developer

And finally ... why do people need object-oriented languages?
because OOD solves some kinds of problems, in an excellent way.

why do some people like Common Lisp?

because it solves a large amount of problems in an excellent way
I am sorry for making so many questions.
Arnaldo, you need to *code*, trust me. i was in the same situation and
i askedmany questions like the one you asked but now i got out of it.
i am learning coding in C

:-)

BTW, "user-----" is right when he said:

"If a language is useful, it survives and evolves"

i see, same is true for Common Lisp, OCaml and Mercury.

i met a COBOL programmer a few days ago. she knows nothing except of
COBOL and she does coding for IBM mainframe located at the capital of
my country.
before posting anything make sure you "search" the archives.most of
the times, i found, my question was already asked and answered here.

good luck

Mar 21 '07 #5

P: n/a
On Tue, 20 Mar 2007 22:18:00 -0700, ajba74 wrote:
Is object-oriented better?
Object-oriented programming is a fad, like many other fads that
have plagued to commercial computing application development world. That
does not mean it is useless. Rather, it just means it is not the magic
bullet that many would have us believe. Some problems are well suited to
an object-oriented approach, some others are not. Some people are
comfortable with an object-oriented approach, some other people are not.
Is necessary to switch to C++ or some object-oriented language?
If you want to do, say, GUIs or classify animals, maybe. If you
are interested in, say, working close to the metal, no.
Is it true that C tends to be decreasingly used?
No.
And finally ... why do people need object-oriented languages?
What people?

Mar 21 '07 #6

P: n/a
On 20 Mrz., 21:18, ajb...@gmail.com wrote:
Hi fellows,
Looks like you are a complete newbie.

The future of C is questionable. It is or will be a niche language
soon.
Used only in embedded development or some low level tasks like
operating
systems etc.

The reason is simple: Most important libraries use at least some C++
features,
and it is a pain in the ass to use C for GUI codeing (with the only C
toolkit
GTK). So application development is C++ or another language (like
Java, Eiffel,
Fortran, Lisp) depending on problem area and your project leader.

If you want to be a good programmer you need to learn about a half
dozend or more
languages. My current project has about 7 different languages (C, C++,
Eiffel, Ruby,
Lua, Python, PHP) and i know about half a dozend more. So first learn
C, learn as much
C++ to understand the code and be able to use Templates, learn Lisp,
learn (or look at)
a functional language.

If you lazy and don't want to stick to one language only, please
become an system
administrator and not a programmer - i don't want see any one-language
person as
(theoretical) team colleagues. It a pain to work with them. Have done
this too many
times and often have to do there work too.

Mar 21 '07 #7

P: n/a
llothar said:
On 20 Mrz., 21:18, ajb...@gmail.com wrote:
>Hi fellows,

Looks like you are a complete newbie.

The future of C is questionable.
Yeah, right.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Mar 21 '07 #8

P: n/a
On Mar 21, 8:22 pm, Richard Heathfield <r...@see.sig.invalidwrote:
The future of C is questionable.

Yeah, right.
ha....ha.....ha....

LOL

:-)

Mar 21 '07 #9

P: n/a
On Mar 21, 9:11 pm, "arnuld" <geek.arn...@gmail.comwrote:
On Mar 21, 8:22 pm, Richard Heathfield <r...@see.sig.invalidwrote:
The future of C is questionable.
Yeah, right.

ha....ha.....ha....

LOL

:-)

great job Richard

:-)

Mar 21 '07 #10

P: n/a
On Wed, 21 Mar 2007 10:00:53 -0500, llothar wrote
(in article <11**********************@y66g2000hsf.googlegroups .com>):
On 20 Mrz., 21:18, ajb...@gmail.com wrote:
>Hi fellows,

Looks like you are a complete newbie.

The future of C is questionable. It is or will be a niche language
soon.
I remember hearing that shouted from all the trade rags far and near
starting over 20 years ago. C apparently takes longer to die than a
bad actor in a low-budget production of a Shakespeare play.
Used only in embedded development or some low level tasks like
operating systems etc.
Yeah, like every single operating system that is running outside of
university research lab. Pretty narrow presence there. IOW, C code is
running on basically every desktop, portable, workstation and server on
the planet. Very, very poor market penetration. If C was a stock on
the Nasdaq, it would definitely be plummeting.

[I hope everyone's sarcasm detectors are enabled]

If you want to be a good programmer you need to learn about a half
dozend or more languages.
You finally said something that isn't demonstrably false. I don't
totally agree, you don't have to do that to be a good programmer, but
I'm fairly convinced that it improves the odds quite a bit. Most of
the really good programmers I know have a lot more than that in their
toolkit, but that's partly a function of time. Most of them achieve
that status only after a lot of years in the practice of it, and
languages come and go during long time spans. C is the only one that
has been around during the entire time I've been programming and not
gone into the dustbin of history, and will pretty obviously outlive me
by a substantial time period.
--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw

Mar 21 '07 #11

P: n/a
On 21 Mrz., 07:22, Richard Heathfield <r...@see.sig.invalidwrote:
>
The future of C is questionable.

Yeah, right.
Thanks for confirmation of my point of view.

Didn't expect anything else someone who haven't checked
his tool chain since 1989.
Mar 21 '07 #12

P: n/a
I remember hearing that shouted from all the trade rags far and near
starting over 20 years ago. C apparently takes longer to die than a
Well and it almost reached this state in the last years.
Yeah, like every single operating system that is running outside of
university research lab. Pretty narrow presence there. IOW, C code is
So it is used in about 10 different applications. This does sound very
much like a niche for me.

And yes it the "specification language" of most operating systems,
except maybe MacOSX.

Mar 21 '07 #13

P: n/a
>>>>"RH" == Randy Howard <ra*********@FOOverizonBAR.netwrites:

RHMost of them achieve that status only after a lot of years in
RHthe practice of it, and languages come and go during long time
RHspans. C is the only one that has been around during the
RHentire time I've been programming and not gone into the
RHdustbin of history, and will pretty obviously outlive me by a
RHsubstantial time period.

Surely you aren't relegating Lisp, COBOL, and FORTRAN to the dustbin
of history?

Charlton

--
Charlton Wilbur
cw*****@chromatico.net
Mar 21 '07 #14

P: n/a
On Mar 21, 12:18 am, ajb...@gmail.com wrote:

[snip]
So, I started to ask myself...

Is object-oriented better?
Like everything else in software, the answer is, "it depends." Some
solutions are easier to visualize and implement using object-oriented
languages or techniques. Some solutions are easier to visualize and
implement using procedural techniques.

OOP comes with its own benefits and costs, and in practice some of the
more hyped benefits (increased productivity, decreased development
time, significant code reuse) haven't materialized to a significant
degree. One wag described inheritance as a good way to make sure that
the bad decisions you made at the beginning of a project stay with you
forever. Any code reuse is offset by the amount of code you have to
write to take advantage of it, and at best what you get is better
described as interface reuse. And increased productivity comes
through improvements in the overall development process, not just
choice of programming language.
Is necessary to switch to C++ or some object-oriented language?
No. It *is* possible to do object-oriented programming using C,
although it's not straightforward and you'll probably need some
additional tools. A language that's designed to be OO will make OO
programming easier (or at least more straightforward).

Having said that, I think it's a good idea to learn C++ and Java (and
Python and Haskell and Lisp and...); the more languages you expose
yourself to, the better able you will be to choose the appropriate one
for the task.
Is it true that C tends to be decreasingly used?
>From what I've seen personally, yes; my company is using C# on the
Windows side and C++ and Java on the Linux side. However, my company
is just one of thousands, so that may or may not be as widespread as I
think.

What *is* true is that C is a product of the early 1970s, and its age
is showing. It was designed in the age minicomputers and glass ttys,
and so has no built-in support for graphics or networking or sound or
a number of other technologies that we now take for granted, but were
almost unheard of back then.

The cool thing about modern languages like Java is that they *do*
provide built-in support for all those things, and other stuff
besides.

And don't forget, while C may be decreasingly used for new projects,
there's over 30 years' worth of legacy software out there that has to
be maintained; there's plenty of work in C for anyone who wants it.
And finally ... why do people need object-oriented languages?
Again, some solutions are easier to implement in an object-oriented
language (concurrency is one area where I think the OO approach makes
life easier). There's also a claim that very large projects are
easier to manage using OOPLs, although in practice I haven't noticed a
huge difference.
>
I am sorry for making so many questions.

Thank you all,

Arnaldo

Mar 21 '07 #15

P: n/a
On Wed, 21 Mar 2007 13:13:01 -0500, llothar wrote
(in article <11**********************@d57g2000hsg.googlegroups .com>):
>I remember hearing that shouted from all the trade rags far and near
starting over 20 years ago. C apparently takes longer to die than a

Well and it almost reached this state in the last years.
No it hasn't. Feel free to stop spewing BS whenever the mood strikes
you. You're not fooling anyone here.
>Yeah, like every single operating system that is running outside of
university research lab. Pretty narrow presence there. IOW, C code is

So it is used in about 10 different applications. This does sound very
much like a niche for me.
Are you really a programmer? Your logic pin appears to be tied to
ground.
And yes it the "specification language" of most operating systems,
except maybe MacOSX.
What is a specification language? OS X is written in C, some assembler
and other odds and ends. Objective-C is recommended for app
development for the Aqua GUI environment, which is a different thing
altogether. You are not expected to understand this.

--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw

Mar 21 '07 #16

P: n/a
llothar wrote:
And yes it the "specification language" of most operating systems,
except maybe MacOSX.
Are you sure you know what MacOS X is based on?

The core: a BSD Unix: C code.
The GUI: Carbon: C Code; Cocoa: Objective-C.

No C++ around, and mostly C.
(BTW, Objective-C is, IMO, a far cleaner OOP language than C++.)
Mar 21 '07 #17

P: n/a
Randy Howard said:
On Wed, 21 Mar 2007 13:13:01 -0500, llothar wrote
>>
So [C] is used in about 10 different applications. This does sound
very much like a niche for me.

Are you really a programmer?
No, I think he's almost certainly a troll.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Mar 21 '07 #18

P: n/a
On 21 Mar 2007 01:24:56 -0700, "arnuld" wrote:
>On Mar 21, 10:18 am, ajb...@gmail.com wrote:
or "... C is a subset of C++ ..."

complete NON-SENSE
Syntactically, C is a subset of C++ with minor exceptions. This fact
was the main reason for C++'s initial success.
>Is it true that C tends to be decreasingly used?

"decreasingly used" where corporate, schools, research etc.
in corporate yes but still you need C for that because you will always
come across with C code when working as a C++ software developer
Actually, C++ is "decreasingly used". C is the only portable system
programming language and, for this reason alone, will outlive its
successors.

Best regards,
Roland Pibinger
Mar 21 '07 #19

P: n/a
On Mar 21, 1:38 pm, rpbg...@yahoo.com (Roland Pibinger) wrote:
On 21 Mar 2007 01:24:56 -0700, "arnuld" wrote:
On Mar 21, 10:18 am, ajb...@gmail.com wrote:
or "... C is a subset of C++ ..."
complete NON-SENSE

Syntactically, C is a subset of C++ with minor exceptions. This fact
was the main reason for C++'s initial success.
Even Bjarne Stroustrup has admitted that this claim is false.
C is not a subset of C++ with minor exceptions.
Is it true that C tends to be decreasingly used?
"decreasingly used" where corporate, schools, research etc.
in corporate yes but still you need C for that because you will always
come across with C code when working as a C++ software developer

Actually, C++ is "decreasingly used". C is the only portable system
programming language and, for this reason alone, will outlive its
successors.
C++ also has a standard, as does Fortran, and many others. Therefore,
these languages are portable.
GCC and G++ are pretty much available on anything you can think of and
some things you can't.
I guess that the places where there is a C compiler and no C++
compiler is limited to a few DSPs.

IMO-YMMV.
Best regards,
Roland Pibinger

Mar 21 '07 #20

P: n/a
"user923005" <dc*****@connx.comwrites:
On Mar 21, 1:38 pm, rpbg...@yahoo.com (Roland Pibinger) wrote:
>On 21 Mar 2007 01:24:56 -0700, "arnuld" wrote:
>On Mar 21, 10:18 am, ajb...@gmail.com wrote:
or "... C is a subset of C++ ..."
>complete NON-SENSE

Syntactically, C is a subset of C++ with minor exceptions. This fact
was the main reason for C++'s initial success.

Even Bjarne Stroustrup has admitted that this claim is false.
C is not a subset of C++ with minor exceptions.
But would you deny that C++'s close relationship to C had an
effect on its initial success? My guess is that this is a true
statement, although I'm no scholar of C++ history.
--
"What is appropriate for the master is not appropriate for the novice.
You must understand the Tao before transcending structure."
--The Tao of Programming
Mar 21 '07 #21

P: n/a
"Ben Pfaff" <bl*@cs.stanford.eduwrote in message
>
But would you deny that C++'s close relationship to C had an
effect on its initial success? My guess is that this is a true
statement, although I'm no scholar of C++ history.
I think the name was a big factor.
Most people would ignore "C with classes" because they last needed classes
back in high school. However to admit you don't know a language called C++
is to brand yourself a person--. So it caught on.

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

Mar 21 '07 #22

P: n/a

"Charlton Wilbur" <cw*****@chromatico.netwrote in message
>
Surely you aren't relegating Lisp, COBOL, and FORTRAN to the dustbin
of history?
I've just spent the last three days translating a Fortran 77 routine to C.
It was a long routine. The C version will probably run slower, but it will
be easier to try out different algorithms to speed it up, and it can take
inputs of arbitrary size. F77 doesn't have a malloc().
--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

Mar 21 '07 #23

P: n/a
<aj****@gmail.comwrote in message
Is object-oriented better?
Is an axe better than a saw? You can use either for a lot of jobs, but most
people would dismiss the question as meaningless.
>
Is necessary to switch to C++ or some object-oriented language?
It is necessary to know an object-oriented language if you wish to be an
adequately skilled programmer. In practise that means either Java or C++.
You should also understand where not to use object-oriented design.
>
Is it true that C tends to be decreasingly used?
More and more languages are coming out and that is inevitably having an
effect on C's market share. However none look like displacing C as the
default lanauge for serious programming.
>
And finally ... why do people need object-oriented languages?
To do object-oriented design. Though it is possible to implement object
hierarchies in any language, including C, it is so messy as to be unusable.
If you are asking why do object-oriented design, if you want your program to
be extended by a third party in ways unforseen by you, but without any
changes to your source code, objects offer by far the easiest way to do
this. For instance a space invader may travel a path specified by a "line"
object. A line has certain properties, namely that it has a length, and x, y
coordinates given by a t value. Any object supporting the interface "line"
can be passed to the space invader control, including really odd lines such
as the programmer's name in Arabic.

More controversially, object-oriented desings may be easier to test, debug
and maintain than procedural ones. Personally I am sceptical, but it is
received wisdom.

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

Mar 21 '07 #24

P: n/a
On 21 Mar 2007 14:14:26 -0700, "user923005" wrote:
>Even Bjarne Stroustrup has admitted that this claim is false.
C is not a subset of C++ with minor exceptions.
'How close is "as close as possible to C?" Traditionally, it has
almost been possible to equate that statement with "compatible with C
except where the C++ type system would be compromised." '

http://www.research.att.com/~bs/siblings_short.pdf
Mar 21 '07 #25

P: n/a
On Mar 21, 3:29 pm, rpbg...@yahoo.com (Roland Pibinger) wrote:
On 21 Mar 2007 14:14:26 -0700, "user923005" wrote:
Even Bjarne Stroustrup has admitted that this claim is false.
C is not a subset of C++ with minor exceptions.

'How close is "as close as possible to C?" Traditionally, it has
almost been possible to equate that statement with "compatible with C
except where the C++ type system would be compromised." '

http://www.research.att.com/~bs/siblings_short.pdf
/*
Where is the C++ tyep system compromised here:
*/
int main(void)
{
int new = 0;
return new;
}

Mar 21 '07 #26

P: n/a
On Mar 21, 3:29 pm, rpbg...@yahoo.com (Roland Pibinger) wrote:
On 21 Mar 2007 14:14:26 -0700, "user923005" wrote:
Even Bjarne Stroustrup has admitted that this claim is false.
C is not a subset of C++ with minor exceptions.

'How close is "as close as possible to C?" Traditionally, it has
almost been possible to equate that statement with "compatible with C
except where the C++ type system would be compromised." '

http://www.research.att.com/~bs/siblings_short.pdf
Having read the paper, I agree with it. I think this statement is
telling:

'The "as close as possible ..." rules were crafted under the
assumption that "the other language" was immutable. In reality, it has
not been so: Just look as the number of cross borrowings between C and
C++ [Stroustrup,2002].'

Mar 21 '07 #27

P: n/a
On Mar 21, 2:29 pm, Ben Pfaff <b...@cs.stanford.eduwrote:
"user923005" <dcor...@connx.comwrites:
On Mar 21, 1:38 pm, rpbg...@yahoo.com (Roland Pibinger) wrote:
On 21 Mar 2007 01:24:56 -0700, "arnuld" wrote:
On Mar 21, 10:18 am, ajb...@gmail.com wrote:
or "... C is a subset of C++ ..."
complete NON-SENSE
Syntactically, C is a subset of C++ with minor exceptions. This fact
was the main reason for C++'s initial success.
Even Bjarne Stroustrup has admitted that this claim is false.
C is not a subset of C++ with minor exceptions.

But would you deny that C++'s close relationship to C had an
effect on its initial success? My guess is that this is a true
statement, although I'm no scholar of C++ history.
Certainly not. On the other hand, I think that years of "Thinking in
C" made it harder for me to think in terms of objects. On the other,
other hand, I had years of Fortran and PL/I before C, and so my
handicap started further back.

The two languages have some syntatical similarities, but I would argue
that used properly, neither language really resembles the other at
all.
--
"What is appropriate for the master is not appropriate for the novice.
You must understand the Tao before transcending structure."
--The Tao of Programming

Mar 21 '07 #28

P: n/a
On Mar 21, 2:14 pm, "user923005" <dcor...@connx.comwrote:
On Mar 21, 1:38 pm, rpbg...@yahoo.com (Roland Pibinger) wrote:

Syntactically, C is a subset of C++ with minor exceptions. This fact
was the main reason for C++'s initial success.

Even Bjarne Stroustrup has admitted that this claim is false.
C is not a subset of C++ with minor exceptions.
I suppose it hinges on what you consider "minor", but please specify
why you consider this claim to be false. It's very rare for programs
to need to call main() recursively, or to care about the type of a
charater constant, for example. The need to cast void * to other
object pointer types is slightly more intrusive, but I'd still
consider it minor. Which are the non-minor exceptions?

Mar 22 '07 #29

P: n/a
On Mar 22, 4:21 am, "user923005" <dcor...@connx.comwrote:
On Mar 21, 2:29 pm, Ben Pfaff <b...@cs.stanford.eduwrote:
"user923005" <dcor...@connx.comwrites:
On Mar 21, 1:38 pm, rpbg...@yahoo.com (Roland Pibinger) wrote:
>On 21 Mar 2007 01:24:56 -0700, "arnuld" wrote:
>On Mar 21, 10:18 am, ajb...@gmail.com wrote:
>or "... C is a subset of C++ ..."
>complete NON-SENSE
>Syntactically, C is a subset of C++ with minor exceptions. This fact
>was the main reason for C++'s initial success.
Even Bjarne Stroustrup has admitted that this claim is false.
C is not a subset of C++ with minor exceptions.
But would you deny that C++'s close relationship to C had an
effect on its initial success? My guess is that this is a true
statement, although I'm no scholar of C++ history.

Certainly not. On the other hand, I think that years of "Thinking in
C" made it harder for me to think in terms of objects. On the other,
other hand, I had years of Fortran and PL/I before C, and so my
handicap started further back.

The two languages have some syntatical similarities, but I would argue
that used properly, neither language really resembles the other at
all.
yes that is what *exactly* i meant

thanks "user------"

:-)

Mar 22 '07 #30

P: n/a
rp*****@yahoo.com (Roland Pibinger) wrote:
On 21 Mar 2007 01:24:56 -0700, "arnuld" wrote:
On Mar 21, 10:18 am, ajb...@gmail.com wrote:
or "... C is a subset of C++ ..."
complete NON-SENSE

Syntactically, C is a subset of C++ with minor exceptions.
Syntactically, colourless green ideas sleep furiously. Semantically,
both those sentences are nonsense.

Richard
Mar 22 '07 #31

P: n/a
On Mar 21, 10:04 pm, Randy Howard <randyhow...@FOOverizonBAR.net>
wrote:
And yes it the "specification language" of most operating systems,
except maybe MacOSX.

What is a specification language? OS X is written in C, some assembler
and other odds and ends. Objective-C is recommended for app
development for the Aqua GUI environment, which is a different thing
altogether. You are not expected to understand this.
Actually, they're pushing (a subset of) C++ for writing
device drivers / kernel modules in OS X.
Search for I/O Kit, etc this may give you some clue.

Thanks god it's not possible to do the same (use C++) in the linux or
freebsd kernel :)

You are not expected to understand this, either.

Mar 22 '07 #32

P: n/a
In article <46****************@news.xs4all.nl>,
Richard Bos <rl*@hoekstra-uitgeverij.nlwrote:
>rp*****@yahoo.com (Roland Pibinger) wrote:
>On 21 Mar 2007 01:24:56 -0700, "arnuld" wrote:
>On Mar 21, 10:18 am, ajb...@gmail.com wrote:
or "... C is a subset of C++ ..."

complete NON-SENSE

Syntactically, C is a subset of C++ with minor exceptions.

Syntactically, colourless green ideas sleep furiously. Semantically,
both those sentences are nonsense.
No. Semantically, "C is a subset of C++" is a perfectly valid and
well-formed claim; the simple fact that it's false doesn't make it
nonsense.
dave

--
Dave Vandervies dj******@csclub.uwaterloo.ca
Well, it's logically consistent and interesting. That appears to be
all mathematicians need.
--James Riden in the scary devil monastery
Mar 22 '07 #33

P: n/a
llothar wrote:
On 21 Mrz., 07:22, Richard Heathfield <r...@see.sig.invalidwrote:
The future of C is questionable.
Yeah, right.

Thanks for confirmation of my point of view.
Time for you go.
*plonk*


Brian
Mar 22 '07 #34

P: n/a
On Mar 21, 7:16 pm, "J. J. Farrell" <j...@bcs.org.ukwrote:
On Mar 21, 2:14 pm, "user923005" <dcor...@connx.comwrote:
On Mar 21, 1:38 pm, rpbg...@yahoo.com (Roland Pibinger) wrote:
Syntactically, C is a subset of C++ with minor exceptions. This fact
was the main reason for C++'s initial success.
Even Bjarne Stroustrup has admitted that this claim is false.
C is not a subset of C++ with minor exceptions.

I suppose it hinges on what you consider "minor", but please specify
why you consider this claim to be false. It's very rare for programs
to need to call main() recursively, or to care about the type of a
charater constant, for example. The need to cast void * to other
object pointer types is slightly more intrusive, but I'd still
consider it minor. Which are the non-minor exceptions?
Take this tarball:
http://wwwmaster.postgresql.org/down...-8.2.3.tar.bz2
Which is the PostgreSQL database (written in the C language).
Rename all of the .c files to .cpp and try to compile it.
Basically none of the files will compile.
This also belies the claim that "Good C programs tend to be C++
programs".

Mar 22 '07 #35

P: n/a
On Mar 22, 9:00 am, dj3va...@caffeine.csclub.uwaterloo.ca (Dave
Vandervies) wrote:
In article <46023853.175353...@news.xs4all.nl>,

Richard Bos <r...@hoekstra-uitgeverij.nlwrote:
rpbg...@yahoo.com (Roland Pibinger) wrote:
On 21 Mar 2007 01:24:56 -0700, "arnuld" wrote:
On Mar 21, 10:18 am, ajb...@gmail.com wrote:
or "... C is a subset of C++ ..."
complete NON-SENSE
Syntactically, C is a subset of C++ with minor exceptions.
Syntactically, colourless green ideas sleep furiously. Semantically,
both those sentences are nonsense.

No. Semantically, "C is a subset of C++" is a perfectly valid and
well-formed claim; the simple fact that it's false doesn't make it
nonsense.

dave

--
Dave Vandervies dj3va...@csclub.uwaterloo.ca
Well, it's logically consistent and interesting. That appears to be
all mathematicians need.
--James Riden in the scary devil monastery
Dictionary.com Unabridged (v 1.1) - Cite This Source
non新ense /'n?ns?ns, -s?ns/ Pronunciation Key - Show Spelled
Pronunciation[non-sens, -suhns] Pronunciation Key - Show IPA
Pronunciation
-noun
1. words or language having little or no sense or meaning.
2. conduct, action, etc., that is senseless, foolish, or absurd: to
have tolerated enough nonsense.
3. impudent, insubordinate, or otherwise objectionable behavior: He
doesn't have to take that nonsense from you.
4. something absurd or fatuous: the utter nonsense of such a
suggestion.
5. anything of trifling importance or of little or no use.
6. Genetics. a DNA sequence that does not code for an amino acid and
is not transcribed (distinguished from sense).
[Origin: 1605-15; non- + sense]

-Related forms
non新en新i搾al /n?n's?ns?k?l/ Pronunciation Key - Show Spelled
Pronunciation[non-sen-si-kuhl] Pronunciation Key - Show IPA
Pronunciation, adjective
non新en新i搾al損y, adverb
non新en新i搾al搖ess, non新en新i搾al搏暗y, noun

-Synonyms 1. twaddle, balderdash, moonshine, absurdity.
Dictionary.com Unabridged (v 1.1)
Based on the Random House Unabridged Dictionary, Random House, Inc.
2006.

Perhaps meaning 4 is related to the claim.

A document related to this thread that is well worth reading:
"Productivity Analysis of Object-Oriented Software Developed in a
Commercial Environment"
Thomas E. Potok

Mar 22 '07 #36

P: n/a
On Thu, 22 Mar 2007 09:19:25 -0500, Racaille wrote
(in article <11**********************@d57g2000hsg.googlegroups .com>):
On Mar 21, 10:04 pm, Randy Howard <randyhow...@FOOverizonBAR.net>
wrote:
>>And yes it the "specification language" of most operating systems,
except maybe MacOSX.

What is a specification language? OS X is written in C, some assembler
and other odds and ends. Objective-C is recommended for app
development for the Aqua GUI environment, which is a different thing
altogether. You are not expected to understand this.

Actually, they're pushing (a subset of) C++ for writing
device drivers / kernel modules in OS X.
Search for I/O Kit, etc this may give you some clue.
Feel free to explain how that repudiates the claim which you snipped
about OS X and "specification languages"

--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw

Mar 22 '07 #37

P: n/a
On Mar 22, 11:48 am, "user923005" <dcor...@connx.comwrote:
On Mar 21, 7:16 pm, "J. J. Farrell" <j...@bcs.org.ukwrote:


On Mar 21, 2:14 pm, "user923005" <dcor...@connx.comwrote:
On Mar 21, 1:38 pm, rpbg...@yahoo.com (Roland Pibinger) wrote:
Syntactically, C is a subset of C++ with minor exceptions. This fact
was the main reason for C++'s initial success.
Even Bjarne Stroustrup has admitted that this claim is false.
C is not a subset of C++ with minor exceptions.
I suppose it hinges on what you consider "minor", but please specify
why you consider this claim to be false. It's very rare for programs
to need to call main() recursively, or to care about the type of a
charater constant, for example. The need to cast void * to other
object pointer types is slightly more intrusive, but I'd still
consider it minor. Which are the non-minor exceptions?

Take this tarball:http://wwwmaster.postgresql.org/down...le=%2Fsource%2...
Which is the PostgreSQL database (written in the C language).
Rename all of the .c files to .cpp and try to compile it.
Basically none of the files will compile.
I don't see how that's relevant to the question. If the minor
exceptions are widely used, there'll obviously be problems compiling.

Mar 22 '07 #38

P: n/a
On Mar 22, 4:35 pm, "J. J. Farrell" <j...@bcs.org.ukwrote:
On Mar 22, 11:48 am, "user923005" <dcor...@connx.comwrote:


On Mar 21, 7:16 pm, "J. J. Farrell" <j...@bcs.org.ukwrote:
On Mar 21, 2:14 pm, "user923005" <dcor...@connx.comwrote:
On Mar 21, 1:38 pm, rpbg...@yahoo.com (Roland Pibinger) wrote:
Syntactically, C is a subset of C++ with minor exceptions. This fact
was the main reason for C++'s initial success.
Even Bjarne Stroustrup has admitted that this claim is false.
C is not a subset of C++ with minor exceptions.
I suppose it hinges on what you consider "minor", but please specify
why you consider this claim to be false. It's very rare for programs
to need to call main() recursively, or to care about the type of a
charater constant, for example. The need to cast void * to other
object pointer types is slightly more intrusive, but I'd still
consider it minor. Which are the non-minor exceptions?
Take this tarball:http://wwwmaster.postgresql.org/down...le=%2Fsource%2...
Which is the PostgreSQL database (written in the C language).
Rename all of the .c files to .cpp and try to compile it.
Basically none of the files will compile.

I don't see how that's relevant to the question. If the minor
exceptions are widely used, there'll obviously be problems compiling
Many of the problems are related to keywords.
Some of the problems are caused by the new casting rules (the C style
casts are no longer acceptable in certain cases).
There are various other differences pointed out in the document
appearing elsethread from AT&T.

Whatever the reasons are, the code bases have diverged. To me,
language differences are not minor if code cannot even be compiled
without rewriting it.

The changes from C to C++ are more drastic than from Fortran IV to
Fortran95.

I suppose that each and every difference between C and C++ could be
considered minor differences. But if those differences mean that a
major rewrite is necessary to compile, then *I* consider them to be
major differences. I guess by major I was thinking in terms of things
like "It would cost over one million dollars to convert PostgreSQL
from C into C++"

It is true that there is a subset of C that will compile and run as C+
+. But programs in real life are almost never members of that set.

IMO-YMMV.

Mar 23 '07 #39

P: n/a
On Mar 22, 5:02 pm, "user923005" <dcor...@connx.comwrote:
On Mar 22, 4:35 pm, "J. J. Farrell" <j...@bcs.org.ukwrote:
On Mar 22, 11:48 am, "user923005" <dcor...@connx.comwrote:
On Mar 21, 7:16 pm, "J. J. Farrell" <j...@bcs.org.ukwrote:
On Mar 21, 2:14 pm, "user923005" <dcor...@connx.comwrote:
On Mar 21, 1:38 pm, rpbg...@yahoo.com (Roland Pibinger) wrote:
Syntactically, C is a subset of C++ with minor exceptions. This fact
was the main reason for C++'s initial success.
Even Bjarne Stroustrup has admitted that this claim is false.
C is not a subset of C++ with minor exceptions.
I suppose it hinges on what you consider "minor", but please specify
why you consider this claim to be false. It's very rare for programs
to need to call main() recursively, or to care about the type of a
charater constant, for example. The need to cast void * to other
object pointer types is slightly more intrusive, but I'd still
consider it minor. Which are the non-minor exceptions?
Take this tarball:http://wwwmaster.postgresql.org/down...le=%2Fsource%2...
Which is the PostgreSQL database (written in the C language).
Rename all of the .c files to .cpp and try to compile it.
Basically none of the files will compile.
I don't see how that's relevant to the question. If the minor
exceptions are widely used, there'll obviously be problems compiling

Many of the problems are related to keywords.
Some of the problems are caused by the new casting rules (the C style
casts are no longer acceptable in certain cases).
There are various other differences pointed out in the document
appearing elsethread from AT&T.

Whatever the reasons are, the code bases have diverged. To me,
language differences are not minor if code cannot even be compiled
without rewriting it.

The changes from C to C++ are more drastic than from Fortran IV to
Fortran95.

I suppose that each and every difference between C and C++ could be
considered minor differences. But if those differences mean that a
major rewrite is necessary to compile, then *I* consider them to be
major differences. I guess by major I was thinking in terms of things
like "It would cost over one million dollars to convert PostgreSQL
from C into C++"

It is true that there is a subset of C that will compile and run as
C++. But programs in real life are almost never members of that set.
Agreed on all counts - different interpretations of "minor". The list
of differences is small, and each of them is minor. It is possible to
turn valid C code into valid C++ code with a few minor modifications;
that is, it is incredibly unlikely to need any redesign, almost all
the changes would be little more than editorial, and there usually
wouldn't be that many of them. That doesn't mean that C code can be
compiled as C++ code, or that it's a minor job to take a real-world C
program and do the minimal work required to make it a valid C++
program.

Mar 23 '07 #40

P: n/a
J. J. Farrell wrote:
On Mar 22, 5:02 pm, "user923005" <dcor...@connx.comwrote:
>>
I suppose that each and every difference between C and C++ could be
considered minor differences. But if those differences mean that a
major rewrite is necessary to compile, then *I* consider them to be
major differences. I guess by major I was thinking in terms of things
like "It would cost over one million dollars to convert PostgreSQL
from C into C++"

It is true that there is a subset of C that will compile and run as
C++. But programs in real life are almost never members of that set.


Agreed on all counts - different interpretations of "minor". The list
of differences is small, and each of them is minor. It is possible to
turn valid C code into valid C++ code with a few minor modifications;
that is, it is incredibly unlikely to need any redesign, almost all
the changes would be little more than editorial, and there usually
wouldn't be that many of them. That doesn't mean that C code can be
compiled as C++ code, or that it's a minor job to take a real-world C
program and do the minimal work required to make it a valid C++
program.
I've only had to do this once and it was tedious but not too hard. I
certainly wouldn't do it unless the cost was justified.

If you want to use the common subset, do it from day 1.

--
Ian Collins.
Mar 23 '07 #41

P: n/a
"J. J. Farrell" <jj*@bcs.org.ukwrote:
On Mar 22, 11:48 am, "user923005" <dcor...@connx.comwrote:
On Mar 21, 7:16 pm, "J. J. Farrell" <j...@bcs.org.ukwrote:
On Mar 21, 2:14 pm, "user923005" <dcor...@connx.comwrote:
I suppose it hinges on what you consider "minor", but please specify
why you consider this claim to be false. It's very rare for programs
to need to call main() recursively, or to care about the type of a
charater constant, for example. The need to cast void * to other
object pointer types is slightly more intrusive, but I'd still
consider it minor. Which are the non-minor exceptions?
Take this tarball:http://wwwmaster.postgresql.org/down...le=%2Fsource%2...
Which is the PostgreSQL database (written in the C language).
Rename all of the .c files to .cpp and try to compile it.
Basically none of the files will compile.

I don't see how that's relevant to the question. If the minor
exceptions are widely used, there'll obviously be problems compiling.
If they're widely used, I wouldn't call them minor. Some people would
say that the differences between a monkey's genome and a human's are
minor; but the differences between the resulting money and human
definitely aren't.

Richard
Mar 23 '07 #42

P: n/a
Richard Bos wrote:
"J. J. Farrell" <jj*@bcs.org.ukwrote:
On Mar 22, 11:48 am, "user923005" <dcor...@connx.comwrote:
On Mar 21, 7:16 pm, "J. J. Farrell" <j...@bcs.org.ukwrote:
>
On Mar 21, 2:14 pm, "user923005" <dcor...@connx.comwrote:
>
I suppose it hinges on what you consider "minor", but please
specify why you consider this claim to be false. It's very rare
for programs to need to call main() recursively, or to care
about the type of a charater constant, for example. The need to
cast void * to other object pointer types is slightly more
intrusive, but I'd still consider it minor. Which are the
non-minor exceptions?
>
Take this
tarball:http://wwwmaster.postgresql.org/down...rors-ftp?file=
%2Fsource%2... Which is the PostgreSQL database (written in the
C language). Rename all of the .c files to .cpp and try to
compile it. Basically none of the files will compile.
I don't see how that's relevant to the question. If the minor
exceptions are widely used, there'll obviously be problems
compiling.

If they're widely used, I wouldn't call them minor. Some people would
say that the differences between a monkey's genome and a human's are
minor; but the differences between the resulting money and human
definitely aren't.
The common set of C and C++ is pretty broad and useful if one has some
reason to use it. I haven't personally ever needed it.

As far as porting from one language to another, C->C++ is one of the
easiest to do. For the most part, the programs will be broadly
structured correctly, and most the standard headers are acceptable
(except possibly C99 ones) although they should probably be updated to
the C++ replacements at some point. Additionally the C89 standard
library is available.

It can also be a non-trivial job to port some C89 programs to C99. I'm
in the process of modernizing my old text-adventure game, and one of
the tools I used was to run files through a C++ compiler. That
pinpointed all the implicit ints, undeclared functions, and K&R
function defintions that were still hanging around in the code.

Brian
Mar 23 '07 #43

P: n/a
On Mar 23, 11:39 am, "Default User" <defaultuse...@yahoo.comwrote:
Richard Bos wrote:
"J. J. Farrell" <j...@bcs.org.ukwrote:
On Mar 22, 11:48 am, "user923005" <dcor...@connx.comwrote:
On Mar 21, 7:16 pm, "J. J. Farrell" <j...@bcs.org.ukwrote:
On Mar 21, 2:14 pm, "user923005" <dcor...@connx.comwrote:
I suppose it hinges on what you consider "minor", but please
specify why you consider this claim to be false. It's very rare
for programs to need to call main() recursively, or to care
about the type of a charater constant, for example. The need to
cast void * to other object pointer types is slightly more
intrusive, but I'd still consider it minor. Which are the
non-minor exceptions?
Take this
tarball:http://wwwmaster.postgresql.org/down...rors-ftp?file=
%2Fsource%2... Which is the PostgreSQL database (written in the
C language). Rename all of the .c files to .cpp and try to
compile it. Basically none of the files will compile.
I don't see how that's relevant to the question. If the minor
exceptions are widely used, there'll obviously be problems
compiling.
If they're widely used, I wouldn't call them minor. Some people would
say that the differences between a monkey's genome and a human's are
minor; but the differences between the resulting money and human
definitely aren't.

The common set of C and C++ is pretty broad and useful if one has some
reason to use it. I haven't personally ever needed it.

As far as porting from one language to another, C->C++ is one of the
easiest to do. For the most part, the programs will be broadly
structured correctly, and most the standard headers are acceptable
(except possibly C99 ones) although they should probably be updated to
the C++ replacements at some point. Additionally the C89 standard
library is available.

It can also be a non-trivial job to port some C89 programs to C99. I'm
in the process of modernizing my old text-adventure game, and one of
the tools I used was to run files through a C++ compiler. That
pinpointed all the implicit ints, undeclared functions, and K&R
function defintions that were still hanging around in the code.
It can also be fairly difficult to port from C to C++ (if that was
never the intention of the original authors).
I had a notion to try with PostgreSQL, but soon realized that hundreds
(thousands?) of hours were at stake and abandoned it.
We did the first (that I know of) port of PostgreSQL to Win32 several
years ago and we usually convert everything to C++ here, but that one
was a no-go.
The current version of PostgreSQL has some of our code in it.

Mar 23 '07 #44

P: n/a

"user923005" <dc*****@connx.comwrote in message
It can also be fairly difficult to port from C to C++ (if that was
never the intention of the original authors).
I had a notion to try with PostgreSQL, but soon realized that hundreds
(thousands?) of hours were at stake and abandoned it.
We did the first (that I know of) port of PostgreSQL to Win32 several
years ago and we usually convert everything to C++ here, but that one
was a no-go.
The current version of PostgreSQL has some of our code in it.
I am sure that a C++ izer would find a ready market if anyone can be
bothered to hack into a C compiler to write one.
--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

Mar 23 '07 #45

P: n/a
On Mar 23, 3:09 am, r...@hoekstra-uitgeverij.nl (Richard Bos) wrote:
"J. J. Farrell" <j...@bcs.org.ukwrote:


On Mar 22, 11:48 am, "user923005" <dcor...@connx.comwrote:
On Mar 21, 7:16 pm, "J. J. Farrell" <j...@bcs.org.ukwrote:
On Mar 21, 2:14 pm, "user923005" <dcor...@connx.comwrote:
I suppose it hinges on what you consider "minor", but please specify
why you consider this claim to be false. It's very rare for programs
to need to call main() recursively, or to care about the type of a
charater constant, for example. The need to cast void * to other
object pointer types is slightly more intrusive, but I'd still
consider it minor. Which are the non-minor exceptions?
Take this tarball:http://wwwmaster.postgresql.org/down...le=%2Fsource%2...
Which is the PostgreSQL database (written in the C language).
Rename all of the .c files to .cpp and try to compile it.
Basically none of the files will compile.
I don't see how that's relevant to the question. If the minor
exceptions are widely used, there'll obviously be problems compiling.

If they're widely used, I wouldn't call them minor. Some people would
say that the differences between a monkey's genome and a human's are
minor; but the differences between the resulting money and human
definitely aren't.
You're confusing the differences with their impacts. The exceptions
are few and minor, but that shouldn't be taken to imply that they have
little impact. The difference between driving on the left and driving
on the right is minor; the effect of ignoring the difference is not.

Mar 24 '07 #46

P: n/a
On Wed, 21 Mar 2007 22:01:55 -0000, "Malcolm McLean"
<re*******@btinternet.comwrote:
>
"Charlton Wilbur" <cw*****@chromatico.netwrote in message

Surely you aren't relegating Lisp, COBOL, and FORTRAN to the dustbin
of history?
I've just spent the last three days translating a Fortran 77 routine to C.
It was a long routine. The C version will probably run slower, but it will
be easier to try out different algorithms to speed it up, and it can take
inputs of arbitrary size. F77 doesn't have a malloc().
F77 doesn't, but F>=90 has dynamic allocation of arrays and strings
(and F03 also of scalars including structures) that can handle most of
the things you would need malloc() for, and is mostly upward
compatible: F90 is strictly compatible with _Standard_ F77, F95 (and
F03) also except for a few minor things that were bad style anyway,
and F90/95 contains new features than can replace many of the things
that often needed (and used) nonStandard extensions in F<=77.

And I have not verified it myself, but according to the folks in
c.l.fortran all commercial compilers still supported are upgraded to
at least F95 (most are working on F03), and for free-software folks
there are TWO active projects doing F95 for GCC, both of which are now
close enough to handle most things and probably all old code.

This doesn't mean you shouldn't rewrite (or write) in C if you want
(for values of you that may include your boss/client/etc.) just that
needing dynamic allocation is not by itself sufficient reason.

Apr 15 '07 #47

This discussion thread is closed

Replies have been disabled for this discussion.