Given a platform that supports both C and C++ compiler, what other factors
should determine which programming language to use, C or C++, besides
programmers' fluency level?
In what areas of software developments are you using C instead of C++? What
benefits of using C in these areas?
Thanks in advance!
|
|
0
|
|
|
|
Reply
|
lpoint (4)
|
1/17/2004 7:25:54 PM |
|
"eas" <lpoint@countrywide.att.net> wrote in message
news:6%fOb.26477$VS4.821720@bgtnsc04-news.ops.worldnet.att.net...
> Given a platform that supports both C and C++ compiler, what other factors
> should determine which programming language to use, C or C++, besides
> programmers' fluency level?
>
> In what areas of software developments are you using C instead of C++?
What
> benefits of using C in these areas?
C simple. Thor like ugga simple!
Realistically C doesn't have an advantage over C++ other than a simpler
compiler.
Tom
|
|
0
|
|
|
|
Reply
|
tomstdenis3 (162)
|
1/17/2004 7:38:01 PM
|
|
"eas" <lpoint@countrywide.att.net> wrote in message
news:6%fOb.26477$VS4.821720@bgtnsc04-news.ops.worldnet.att.net...
> Given a platform that supports both C and C++ compiler, what other factors
> should determine which programming language to use, C or C++, besides
> programmers' fluency level?
>
> In what areas of software developments are you using C instead of C++?
What
> benefits of using C in these areas?
>
C might give you better portability when writing a library that's intended
to be callable from different languages since most of languages allow
importing of C libraries or calling of C functions.
p.s. you should google for "c over c++" or similar search string, I'm sure
people have discussed this topic many times on the usenet before ;-)
with respect,
Toni Uusitalo
|
|
0
|
|
|
|
Reply
|
tonidot.uusitalo1 (25)
|
1/17/2004 8:54:36 PM
|
|
On Sat, 17 Jan 2004 19:25:54 GMT, "eas" <lpoint@countrywide.att.net>
wrote in comp.lang.c:
> Given a platform that supports both C and C++ compiler, what other factors
> should determine which programming language to use, C or C++, besides
> programmers' fluency level?
Let's pose an analogous question:
Given a tool box that contains both a hammer and a screwdriver, what
other factors should determine which tool to use, hammer or
screwdriver, besides worker's familiarity level?
A professional, and indeed anyone will common sense, will user their
judgement to select the best tool available to him/her to do the job
at hand.
No matter how many more nails than screws one has inserted in one's
career, one should be able to recognize when to use the screwdriver
rather than the hammer.
> In what areas of software developments are you using C instead of C++? What
> benefits of using C in these areas?
>
> Thanks in advance!
Note by the way that your question is not really topical here. The
very existence of the C++ language is irrelevant, immaterial, and
off-topic in comp.lang.c.
If you want opinions on comparisons between languages, you want
(marginally) alt.comp.lang.learn.c-c++ or (much better idea) a
language neutral group like comp.programming.
--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html
|
|
0
|
|
|
|
Reply
|
jackklein (3932)
|
1/17/2004 9:02:30 PM
|
|
"Jack Klein" <jackklein@spamcop.net> wrote in message
news:bc8j00hpl8b4mnbeduknutb9u93mfbnjur@4ax.com...
> On Sat, 17 Jan 2004 19:25:54 GMT, "eas" <lpoint@countrywide.att.net>
> wrote in comp.lang.c:
>
> > Given a platform that supports both C and C++ compiler, what other
factors
> > should determine which programming language to use, C or C++, besides
> > programmers' fluency level?
>
> Let's pose an analogous question:
>
> Given a tool box that contains both a hammer and a screwdriver, what
> other factors should determine which tool to use, hammer or
> screwdriver, besides worker's familiarity level?
Jack, your analogy seems more akin to "should I use Word or Excel" than to
"should I use C or C++".
|
|
0
|
|
|
|
Reply
|
jarmo (52)
|
1/17/2004 9:52:50 PM
|
|
On Sat, 17 Jan 2004 19:38:01 GMT, in comp.lang.c , "Tom St Denis"
<tomstdenis@iahu.ca> wrote:
>
>"eas" <lpoint@countrywide.att.net> wrote in message
>news:6%fOb.26477$VS4.821720@bgtnsc04-news.ops.worldnet.att.net...
>> Given a platform that supports both C and C++ compiler, what other factors
>> should determine which programming language to use, C or C++, besides
>> programmers' fluency level?
>>
>> In what areas of software developments are you using C instead of C++?
>What
>> benefits of using C in these areas?
>
>C simple. Thor like ugga simple!
>
>Realistically C doesn't have an advantage over C++ other than a simpler
>compiler.
What? This is worse than your usual nonsense.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
|
|
0
|
|
|
|
Reply
|
markmcintyre (4547)
|
1/17/2004 11:17:08 PM
|
|
eas wrote:
> Given a platform that supports both C and C++ compiler, what other factors
> should determine which programming language to use, C or C++, besides
> programmers' fluency level?
It's simple. Always use C.
Well, what answer did you expect in comp.lang.c? No other language,
including C++, is topical here.
--
Richard Heathfield : binary@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
|
|
0
|
|
|
|
Reply
|
dontmail (1884)
|
1/18/2004 4:48:29 AM
|
|
eas wrote:
> Given a platform that supports both C and C++ compiler, what other factors
> should determine which programming language to use, C or C++, besides
> programmers' fluency level?
In my opinion, you should use C unless you need an object-oriented
paradigm and you don't feel like building your own object system on top
of C. (It is possible to do just that, but it's fairly complex and isn't
something the maintnence programmer is going to expect. :) )
Of course, if you need to use a specific library that's only callable
from C++, using C would probably be needlessly complex. However, I think
most C libraries are trivially callable from C++.
>
> In what areas of software developments are you using C instead of C++? What
> benefits of using C in these areas?
OS design is mainly done in C and has been since the 1970s-1980s. It's
done in C instead of assembly because C is portable, so you don't need
to rewrite as much to make the OS run on a different machine. It's done
in C instead of C++ because C is simpler and most C++ constructs are
simply not needed. (Maybe there is a lingering perception of compiled
C++ programs being slower or less efficient, but that is hardly the case
anymore.)
--
My address is yvoregnevna gjragl-guerr gjb-gubhfnaq guerr ng lnubb qbg pbz
Note: Rot13 and convert spelled-out numbers to numerical equivalents.
|
|
0
|
|
|
|
Reply
|
see84 (117)
|
1/18/2004 5:18:50 AM
|
|
"Richard Heathfield" <dontmail@address.co.uk.invalid> wrote in message
news:bud36s$9p8$1@titan.btinternet.com...
> eas wrote:
>
> > Given a platform that supports both C and C++ compiler, what other
factors
> > should determine which programming language to use, C or C++, besides
> > programmers' fluency level?
>
> It's simple. Always use C.
>
> Well, what answer did you expect in comp.lang.c? No other language,
> including C++, is topical here.
That doesn't mean you have to live in an ivory tower. ;)
--
Peter
|
|
0
|
|
|
|
Reply
|
airia (1802)
|
1/18/2004 8:58:59 AM
|
|
Peter Nilsson wrote:
> "Richard Heathfield" <dontmail@address.co.uk.invalid> wrote in message
> news:bud36s$9p8$1@titan.btinternet.com...
>> eas wrote:
>>
>> > Given a platform that supports both C and C++ compiler, what other
> factors
>> > should determine which programming language to use, C or C++, besides
>> > programmers' fluency level?
>>
>> It's simple. Always use C.
>>
>> Well, what answer did you expect in comp.lang.c? No other language,
>> including C++, is topical here.
>
> That doesn't mean you have to live in an ivory tower. ;)
Neither does it mean that I do. :-) I have been known to use off-topic
languages, but I try to refrain from so doing in /this/ newsgroup.
--
Richard Heathfield : binary@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
|
|
0
|
|
|
|
Reply
|
invalid29 (585)
|
1/18/2004 10:30:02 AM
|
|
"Jack Klein" <jackklein@spamcop.net> wrote in message
news:bc8j00hpl8b4mnbeduknutb9u93mfbnjur@4ax.com...
> Let's pose an analogous question:
>
> Given a tool box that contains both a hammer and a screwdriver, what
> other factors should determine which tool to use, hammer or
> screwdriver, besides worker's familiarity level?
>
> A professional, and indeed anyone will common sense, will user their
> judgement to select the best tool available to him/her to do the job
> at hand.
>
> No matter how many more nails than screws one has inserted in one's
> career, one should be able to recognize when to use the screwdriver
> rather than the hammer.
Ok, now you've explained that languages are tools best fit for some jobs.
Maybe answering for what job C is best would be in order? I mean, it's a lot
easier to determine what you need with a hammer and a screwdriver than it is
with prog languages and this knowledge does not come by itself.
|
|
0
|
|
|
|
Reply
|
serve (6)
|
1/18/2004 1:46:11 PM
|
|
"eas" <lpoint@countrywide.att.net> wrote:
> Given a platform that supports both C and C++ compiler, what other factors
> should determine which programming language to use, C or C++, besides
> programmers' fluency level?
First of all, programmers' fluency level *MUST* trump all other
considerations. C++ introduces many new concepts -- the biggest
problem being that the most experienced C++ programmer can completely
baffle an average or inexperienced C++ programmer just in the course
of regular usage. So if you have any consideration for maintenance,
and your programmers are not all of equivalent level of proficiency in
C++, then there will be a very high hidden maintenance cost (i.e.,
that of your best programmer being the only one who will ever be able
to debug/maintain your project.)
That said, C++ is the obvious logical progression of the C language.
Its extra features does give it more power, while its
incompatibilities with C don't hamper its functionality. With MSCV
and gcc becoming extremely compliant, there is no real barrier to
entry anymore.
> In what areas of software developments are you using C instead of C++? What
> benefits of using C in these areas?
C's main benefit is that a larger audience of people will understand C
code than C++. Bstrlib (http://bstring.sf.net) has been written
mostly in C, with a completely seperate C++ wrapper, for example.
Besides being fairly stable, its very easy for anyone to understand
how it works. If it were written completely in C++, it would have cut
off half of its audience.
--
Paul Hsieh
http://www.pobox.com/~qed/
http://bstring.sf.net/
|
|
0
|
|
|
|
Reply
|
qed (328)
|
1/18/2004 8:54:55 PM
|
|
In article <news:100l3h44ldpd782@corp.supernews.com>
Serv� Lau <serve@detongiser.com> writes:
>Ok, now [Jack has] explained that languages are tools best fit for some jobs.
>Maybe answering for what job C is best would be in order? I mean, it's a lot
>easier to determine what you need with a hammer and a screwdriver than it is
>with prog languages and this knowledge does not come by itself.
Well, perhaps. But when do you use a belt sander vs. an orbital
sander vs. a sanding block? When do you want a rasp and when do
you want a file? How about a miter saw, a keyhole saw, a jigsaw,
a backsaw, a hacksaw, and a coping saw? (Or if you're in the
construction biz you probably just use a sawzall for everything,
including filing and sanding. :-) )
Seriously, the differences between "closely related" languages like
C, Pascal, and C++ are small enough to be like the situation with
the various saws. In many cases, *any* of them will serve. But
a program best written in Prolog is probably not well-served by
being written in C.
So when are procedure-oriented (even C++ is rather procedure-oriented,
for a language that claims to be object-oriented; compare with
Smalltalk for instance), imperative, normally-compiled,
not-too-far-from-the-machine-instruction-set languages appropriate?
I would say that some indictators include having a problem that
requires large amounts of "compute time" spent in small amounts of
code -- hence "compilation" and "close to the metal" become desirable
-- and you have a fair amount of "human time" to throw into
programming the solution. Another indictator is when you and your
team are already familiar with the procedure-oriented language you
choose. If *no* portability is required, however, you might consider
coding even "closer to the metal" (in assembly) under similar
conditions. This generally greatly increases the amount of "human
time" required, of course.
--
In-Real-Life: Chris Torek, Wind River Systems
Salt Lake City, UT, USA (40�39.22'N, 111�50.29'W) +1 801 277 2603
email: forget about it http://web.torek.net/torek/index.html
Reading email is like searching for food in the garbage, thanks to spammers.
|
|
0
|
|
|
|
Reply
|
nospam252 (1722)
|
1/18/2004 9:20:49 PM
|
|
|
12 Replies
34 Views
(page loaded in 5.467 seconds)
Similiar Articles: Use dll in C Mex S function - comp.soft-sys.matlab> If any o f you have some idea, let me know. > Be specific, e.g the command which i should use in C Mex S function. > > Bye waiting for the answer Writing and compiling kernel modules - comp.sys.hp.hpuxCan I somehow use gcc to compile a kernel module/driver? All refernces say I should use the HP ANSI-C compiler, but I wonder if anybody has managed to use gcc. Fastest way to parse strings from a very big file! - comp.lang.c++ ...Or should I use char arrays and use C-style parsing?? Should I first load the file into a buffer and then parse the large buffer? Or parse and process wach line by ... SAS: decimal place issues - comp.soft-sys.sasSo I think SAS should use a=4800.000 and b=0.5316742081 when calculate c, but ... The data of a and b is displayed with format=8.3 in orginal feeding data set ... How to send binary or hex data in Socket using C ? - comp.unix ...... are either in 4 bytes int or char terminated by NULL byte. So If I need to send "0x00000002 0x00000000 0x00000001" to the remote socket, how should I write this using C ? XMLHTTP TimeOut - comp.lang.javascript> {window.opener.document.etElementById('c_categories').value = ^^[1] If `c_categories' is the ID of a form control, you should use window ... Calling dll or mex files from S-Function Builder block - comp.soft ...Use dll in C Mex S function - comp.soft-sys.matlab Calling dll or mex files from S ... user " <saifbutt@gmail.com> wrote in ... command which i should use in C Mex S ... C-Store, multiple transfer syntaxes - comp.protocols.dicom ...The SCP accepts both and now the SCU issues a C-Store with 2 files, both CT but ... So when the SCU transfers the lossless dataset it should use the presentation context ID ... How may decimal places SAS keep when do calculation - comp.soft ...So I think SAS should use a=4800.000 and b=0.5316742081 when calculate c, but ... The data of a and b is displayed with format=8.3 in orginal feeding data set, but ... writing robust software? - comp.lang.c++.moderated... robustsw.php [..] > Especially with C++0x there should be some nice solutions > for bugs I do often: > > - array out of bounds errors Use std::array instead of C ... unwanted termination of mainprogram - comp.graphics.api.opengl ...... lines of C code under Win32. > The last thing my dll function do is use the glutLeaveMainLoop. > Is that enough to close the graphic window correct? Actually you should ... Borland C++ Builder 6 fstream woes - comp.lang.c++.moderated ...You should use the free getline() function in combination with a std::string that ... Using WIN32API in Borland C++ Builder 6 - C Board Using WIN32API in Borland C++ Builder ... How do you use C++ dll in matlab??? - comp.soft-sys.matlab ...Do I just modify the header to include the extern C statement and then inside the computational routine of the mex file I should just use loadlibrary() and function to ... MPI_TYPE_MAX - comp.parallel.mpib) If I shall consult the documentation for you then you should tell me what MPI you are using. c) If you do not know how to set an environment variable then you ... Script to save a file and use the auto incremented filename - comp ...... from the script the line that defines the filename ('FileName': u'C:\\Documents and Settings\\saariddle\\My Documents\\My Pictures\\Image'\u'44.jpg', ) it should use the ... Who Should Use a Schedule C? | eHow.comIf you own a small business, you file a Schedule C with the Internal Revenue Service. The purpose of this form is to report business income or loss. A hobby does not ... Should I File Schedule C or Schedule C-EZ?Should I File Schedule C or Schedule C-EZ? ... You may be eligible to use the abbreviated Schedule C-EZ instead of the longer ... What C compiler should I use? - Harbour Project - Home3.2. What C compiler should I use? What C compiler do you want to use? The Harbour developers consider GNU GCC to be the supported compiler of the Harbour project ... .net - When should i use [Serializable] in C#? - Stack OverflowI found some that classes use this [Serializable] attribute. What is it? When should I use it? What kinds of benefits will I get? Please explain me with simple ... T1. Should I be using Vitamin C on my skin? | Skinacea.comThe short answer is yes, but only if your skin can handle it. Read on for more information about the skin benefits of vitamin C and why you should use it if you can: Why You Should Use Vitamin C Serum | mjblogideasHave you noticed any other skin care options on the market? Vitamin C serum could. Be the regime's most important specialty add to your daily skin care ... Home Fire Safety | Use and Maintenance of Home Fire ExtinguishersShould I Use a Fire Extinguisher? Consider the following three questions before purchasing ... There are also multi-purpose fire extinguishers - such as those labeled "B-C ... 6/23/2012 3:02:13 PM
|