473,795 Members | 3,006 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
46 3032
On Mar 20, 10:18 pm, ajb...@gmail.co m 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
aj****@gmail.co m 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
aj****@gmail.co m 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
On Mar 21, 10:18 am, ajb...@gmail.co m 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.co m,
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?
"decreasing ly 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
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
On 20 Mrz., 21:18, ajb...@gmail.co m 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
llothar said:
On 20 Mrz., 21:18, ajb...@gmail.co m 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
On Mar 21, 8:22 pm, Richard Heathfield <r...@see.sig.i nvalidwrote:
The future of C is questionable.

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

LOL

:-)

Mar 21 '07 #9
On Mar 21, 9:11 pm, "arnuld" <geek.arn...@gm ail.comwrote:
On Mar 21, 8:22 pm, Richard Heathfield <r...@see.sig.i nvalidwrote:
The future of C is questionable.
Yeah, right.

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

LOL

:-)

great job Richard

:-)

Mar 21 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
10912
by: Myster Ious | last post by:
Polymorphism replaces switch statements, making the code more compact/readable/maintainable/OO whatever, fine! What I understand, that needs to be done at the programming level, is this: a switch-case has a variable (most probably an enumeration) & associated symbols or integral value. Selection is made, base on what symbol/value the variable holds. So
13
7475
by: William Stacey | last post by:
Using the following code sample: public byte Get() { // <= Possible to switch Here?? lock(syncLock) { //Do something in Get(). } }
3
19742
by: pgraeve | last post by:
I am a convert from VB to C# so bear with me on this "conversion" question C# switch statement seems to be the closest relative to VB's Select Case. I used VB's Select Case statement liberally. Now I find myself wanting to use "Select Case" i.e., "switch" in C# regularly, but I always have to find another way b/c C#'s switch statement only allows static or integral variables. For example, I often want to use a switch statement based on the...
5
3692
by: Nadav | last post by:
Hi, I am using FileStream's Async API: BeginRead/EndRead, upon completion callback execution I use the read data and call EndRead, Taking that in mind, I Wonder... does calling EndRead will cause a context switch? What is the kernel object used for blocking EndRead calls? Event and mutex cause a context switch even when the object is signaled and no wait is needed, usage of critical section prevent this switch from happening... what is the...
16
19061
by: ME | last post by:
In C# the following code generates a compiler error ("A constant value is expected"): public void Test(string value) { switch (value) { case SimpleEnum.One.ToString(): MessageBox.Show("Test 1"); break;
13
4537
by: Fei Liu | last post by:
Hi Group, I've got a problem I couldn't find a good solution. I am working with scientific data files in netCDF format. One of the properties of netCDF data is that the actual type of data is only known at run time. Therefore a lot of template based trick isn't too useful. Considering datafile float x(3) 3.5, 2.5, 8.9 double y(3) 2.7, -2.3, 1.2 int z(3) 5, 2, 3
7
1998
by: cytec123187 | last post by:
Hello, I am working on an Adobe Acrobat file that uses javascript for calculations. I am trying to create a field that uses two other fields to determine a number value. I think this requires a switch within a switch, but I am not sure how to do this, as I am a beginner when it comes to javascript. In esscense, I want to set up a code so that each case of value A is calculated at each case of value B. Example:
2
6593
by: Angel Of Death | last post by:
I have a method. It takes some XML as a parameter. Depending on the content of the XML it should create a specific object and call a KNOWN method. So: public void PersistXml(string XmlData){} I then determine what object I should call the Persist method on using a switch statement (not very OO). switch (otype)
9
6283
by: Gordon | last post by:
I want to add a feature to a project I'm working on where i have multiple users set up on my Postgres database with varying levels of access. At the bare minimum there will be a login user who only has read access to the users table so that users can log in. Once a user has been logged in successfully I want to escalate that user's access level to one appropriate to their role, which will include switching the postgres user they are...
2
1460
by: Phillip B Oldham | last post by:
What would be the optimal/pythonic way to subject an object to a number of tests (based on the object's attributes) and redirect program flow? Say I had the following: pets = {'name': 'fluffy', 'species': 'cat', 'size': 'small'} pets = {'name': 'bruno', 'species': 'snake', 'size': 'small'} pets = {'name': 'rex', 'species': 'dog', 'size': 'large'}
0
9522
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10448
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10167
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9046
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7544
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5566
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2922
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.