Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.arch.embedded > #18693 > unrolled thread
| Started by | Nobody <nobody@nowhere.invalid> |
|---|---|
| First post | 2014-10-17 00:00 +0100 |
| Last post | 2014-10-22 19:06 +0200 |
| Articles | 20 on this page of 112 — 24 participants |
Back to article view | Back to comp.arch.embedded
validity of ... reasons for preferring C over C++ Nobody <nobody@nowhere.invalid> - 2014-10-17 00:00 +0100
Re: validity of ... reasons for preferring C over C++ Wouter van Ooijen <wouter@voti.nl> - 2014-10-17 07:38 +0200
Re: validity of ... reasons for preferring C over C++ David Brown <david.brown@hesbynett.no> - 2014-10-17 09:27 +0200
Re: validity of ... reasons for preferring C over C++ Tom Gardner <spamjunk@blueyonder.co.uk> - 2014-10-17 09:29 +0100
Re: validity of ... reasons for preferring C over C++ David Brown <david.brown@hesbynett.no> - 2014-10-17 11:19 +0200
Re: validity of ... reasons for preferring C over C++ Paul Rubin <no.email@nospam.invalid> - 2014-10-17 02:35 -0700
Re: validity of ... reasons for preferring C over C++ Arlet Ottens <usenet+5@c-scape.nl> - 2014-10-17 11:43 +0200
Re: validity of ... reasons for preferring C over C++ Tom Gardner <spamjunk@blueyonder.co.uk> - 2014-10-17 12:12 +0100
Re: validity of ... reasons for preferring C over C++ Arlet Ottens <usenet+5@c-scape.nl> - 2014-10-17 13:25 +0200
Re: validity of ... reasons for preferring C over C++ Tom Gardner <spamjunk@blueyonder.co.uk> - 2014-10-17 12:40 +0100
Re: validity of ... reasons for preferring C over C++ Niklas Holsti <niklas.holsti@tidorum.invalid> - 2014-10-17 20:12 +0300
Re: validity of ... reasons for preferring C over C++ Rob Gaddi <rgaddi@technologyhighland.invalid> - 2014-10-17 10:18 -0700
Re: validity of ... reasons for preferring C over C++ upsidedown@downunder.com - 2014-10-17 21:53 +0300
Re: validity of ... reasons for preferring C over C++ Niklas Holsti <niklas.holsti@tidorum.invalid> - 2014-10-17 22:59 +0300
Re: validity of ... reasons for preferring C over C++ Paul Rubin <no.email@nospam.invalid> - 2014-10-17 13:23 -0700
Re: validity of ... reasons for preferring C over C++ Jacob Sparre Andersen <jacob@jacob-sparre.dk> - 2014-10-18 17:46 +0200
Re: validity of ... reasons for preferring C over C++ Paul Rubin <no.email@nospam.invalid> - 2014-10-18 11:45 -0700
Re: validity of ... reasons for preferring C over C++ Niklas Holsti <niklas.holsti@tidorum.invalid> - 2014-10-19 01:51 +0300
Re: validity of ... reasons for preferring C over C++ Jacob Sparre Andersen <jacob@jacob-sparre.dk> - 2014-10-19 12:43 +0200
Re: validity of ... reasons for preferring C over C++ Jacob Sparre Andersen <jacob@jacob-sparre.dk> - 2014-10-18 17:44 +0200
Re: validity of ... reasons for preferring C over C++ David Brown <david.brown@hesbynett.no> - 2014-10-17 12:44 +0200
Re: validity of ... reasons for preferring C over C++ Tom Gardner <spamjunk@blueyonder.co.uk> - 2014-10-17 12:13 +0100
Re: validity of ... reasons for preferring C over C++ Niklas Holsti <niklas.holsti@tidorum.invalid> - 2014-10-17 20:15 +0300
Re: validity of ... reasons for preferring C over C++ Arlet Ottens <usenet+5@c-scape.nl> - 2014-10-17 19:18 +0200
Re: validity of ... reasons for preferring C over C++ David Brown <david.brown@hesbynett.no> - 2014-10-17 23:03 +0200
Re: validity of ... reasons for preferring C over C++ Paul Rubin <no.email@nospam.invalid> - 2014-10-17 14:11 -0700
Re: validity of ... reasons for preferring C over C++ David Brown <david.brown@hesbynett.no> - 2014-10-18 20:14 +0200
Re: validity of ... reasons for preferring C over C++ Tom Gardner <spamjunk@blueyonder.co.uk> - 2014-10-18 22:15 +0100
Re: validity of ... reasons for preferring C over C++ glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2014-10-18 23:07 +0000
Re: validity of ... reasons for preferring C over C++ Tom Gardner <spamjunk@blueyonder.co.uk> - 2014-10-19 00:36 +0100
Re: validity of ... reasons for preferring C over C++ Niklas Holsti <niklas.holsti@tidorum.invalid> - 2014-10-19 10:55 +0300
Re: validity of ... reasons for preferring C over C++ Tom Gardner <spamjunk@blueyonder.co.uk> - 2014-10-19 09:33 +0100
Re: validity of ... reasons for preferring C over C++ "Boudewijn Dijkstra" <sp4mtr4p.boudewijn@indes.com> - 2014-10-20 15:04 +0200
Re: validity of ... reasons for preferring C over C++ David Brown <david.brown@hesbynett.no> - 2014-10-19 13:32 +0200
Re: validity of ... reasons for preferring C over C++ Wouter van Ooijen <wouter@voti.nl> - 2014-10-17 23:44 +0200
Re: validity of ... reasons for preferring C over C++ David Brown <david.brown@hesbynett.no> - 2014-10-18 20:10 +0200
Re: validity of ... reasons for preferring C over C++ Niklas Holsti <niklas.holsti@tidorum.invalid> - 2014-10-18 23:38 +0300
Re: validity of ... reasons for preferring C over C++ Tom Gardner <spamjunk@blueyonder.co.uk> - 2014-10-18 22:21 +0100
Re: validity of ... reasons for preferring C over C++ Niklas Holsti <niklas.holsti@tidorum.invalid> - 2014-10-19 10:43 +0300
Re: validity of ... reasons for preferring C over C++ Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> - 2014-10-19 09:38 +0000
Re: validity of ... reasons for preferring C over C++ David Brown <david.brown@hesbynett.no> - 2014-10-19 14:07 +0200
Re: validity of ... reasons for preferring C over C++ Paul Rubin <no.email@nospam.invalid> - 2014-10-19 19:47 -0700
Re: validity of ... reasons for preferring C over C++ Niklas Holsti <niklas.holsti@tidorum.invalid> - 2014-10-20 06:55 +0300
Re: validity of ... reasons for preferring C over C++ Paul Rubin <no.email@nospam.invalid> - 2014-10-19 21:02 -0700
Re: validity of ... reasons for preferring C over C++ britt.snodgrass@gmail.com - 2014-10-20 04:02 -0700
Re: validity of ... reasons for preferring C over C++ Niklas Holsti <niklas.holsti@tidorum.invalid> - 2014-10-20 18:51 +0300
C and Ada, was: Re: validity of ... reasons for preferring C over C++ Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> - 2014-10-21 00:30 +0000
Re: C and Ada, was: Re: validity of ... reasons for preferring C over C++ Les Cargill <lcargill99@comcast.com> - 2014-10-20 20:49 -0500
Re: C and Ada, was: Re: validity of ... reasons for preferring C over C++ Jacob Sparre Andersen <jacob@jacob-sparre.dk> - 2014-10-21 09:11 +0200
Re: C and Ada, was: Re: validity of ... reasons for preferring C over C++ Les Cargill <lcargill99@comcast.com> - 2014-10-21 08:34 -0500
Re: validity of ... reasons for preferring C over C++ Niklas Holsti <niklas.holsti@tidorum.invalid> - 2014-10-19 21:23 +0300
Re: validity of ... reasons for preferring C over C++ Nobody <nobody@nowhere.invalid> - 2014-10-20 03:39 +0100
Re: validity of ... reasons for preferring C over C++ Tom Gardner <spamjunk@blueyonder.co.uk> - 2014-10-17 12:07 +0100
Re: validity of ... reasons for preferring C over C++ Tom Gardner <spamjunk@blueyonder.co.uk> - 2014-10-17 12:06 +0100
Re: validity of ... reasons for preferring C over C++ David Brown <david.brown@hesbynett.no> - 2014-10-17 14:12 +0200
Re: validity of ... reasons for preferring C over C++ Tom Gardner <spamjunk@blueyonder.co.uk> - 2014-10-17 13:16 +0100
Re: validity of ... reasons for preferring C over C++ Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2014-10-17 14:13 +0200
Re: validity of ... reasons for preferring C over C++ Arlet Ottens <usenet+5@c-scape.nl> - 2014-10-17 14:35 +0200
Re: validity of ... reasons for preferring C over C++ Tom Gardner <spamjunk@blueyonder.co.uk> - 2014-10-17 13:59 +0100
Re: validity of ... reasons for preferring C over C++ Wouter van Ooijen <wouter@voti.nl> - 2014-10-17 17:06 +0200
Re: validity of ... reasons for preferring C over C++ upsidedown@downunder.com - 2014-10-17 19:41 +0300
Re: validity of ... reasons for preferring C over C++ Clifford Heath <no.spam@please.net> - 2014-10-18 10:14 +1100
Re: validity of ... reasons for preferring C over C++ Tom Gardner <spamjunk@blueyonder.co.uk> - 2014-10-18 00:36 +0100
Re: validity of ... reasons for preferring C over C++ Clifford Heath <no.spam@please.net> - 2014-10-20 09:45 +1100
Re: validity of ... reasons for preferring C over C++ Niklas Holsti <niklas.holsti@tidorum.invalid> - 2014-10-18 08:52 +0300
Re: validity of ... reasons for preferring C over C++ Tom Gardner <spamjunk@blueyonder.co.uk> - 2014-10-18 09:41 +0100
Re: validity of ... reasons for preferring C over C++ Dave Nadler <drn@nadler.com> - 2014-10-20 09:46 -0700
Re: validity of ... reasons for preferring C over C++ Paul Rubin <no.email@nospam.invalid> - 2014-10-20 16:26 -0700
Re: validity of ... reasons for preferring C over C++ Dave Nadler <drn@nadler.com> - 2014-10-20 16:42 -0700
Re: validity of ... reasons for preferring C over C++ Paul Rubin <no.email@nospam.invalid> - 2014-10-20 17:24 -0700
Re: validity of ... reasons for preferring C over C++ John Devereux <john@devereux.me.uk> - 2014-10-21 19:09 +0100
Re: validity of ... reasons for preferring C over C++ Wouter van Ooijen <wouter@voti.nl> - 2014-10-24 16:38 +0200
Re: validity of ... reasons for preferring C over C++ Dave Nadler <drn@nadler.com> - 2014-10-21 15:12 -0700
Re: validity of ... reasons for preferring C over C++ Paul Rubin <no.email@nospam.invalid> - 2014-10-21 16:39 -0700
Re: validity of ... reasons for preferring C over C++ Nobody <nobody@nowhere.invalid> - 2014-10-22 01:43 +0100
Re: validity of ... reasons for preferring C over C++ Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2014-10-22 20:00 +0200
Re: validity of ... reasons for preferring C over C++ Stefan Reuther <stefan.news@arcor.de> - 2014-10-22 18:49 +0200
Re: validity of ... reasons for preferring C over C++ Dave Nadler <drn@nadler.com> - 2014-10-21 15:15 -0700
Re: validity of ... reasons for preferring C over C++ Dave Nadler <drn@nadler.com> - 2014-10-22 04:45 -0700
Re: validity of ... reasons for preferring C over C++ Paul Rubin <no.email@nospam.invalid> - 2014-10-22 09:30 -0700
Re: validity of ... reasons for preferring C over C++ Dave Nadler <drn@nadler.com> - 2014-10-23 12:25 -0700
Re: validity of ... reasons for preferring C over C++ Paul Rubin <no.email@nospam.invalid> - 2014-10-23 15:17 -0700
Re: validity of ... reasons for preferring C over C++ glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2014-10-23 22:59 +0000
Re: validity of ... reasons for preferring C over C++ Paul Rubin <no.email@nospam.invalid> - 2014-10-23 16:02 -0700
Re: validity of ... reasons for preferring C over C++ Dave Nadler <drn@nadler.com> - 2014-10-27 08:30 -0700
Re: validity of ... reasons for preferring C over C++ Paul Rubin <no.email@nospam.invalid> - 2014-10-27 09:00 -0700
Re: validity of ... reasons for preferring C over C++ Dave Nadler <drn@nadler.com> - 2014-10-27 09:24 -0700
Re: validity of ... reasons for preferring C over C++ Paul Rubin <no.email@nospam.invalid> - 2014-10-27 09:30 -0700
Re: validity of ... reasons for preferring C over C++ glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2014-10-28 00:52 +0000
Re: validity of ... reasons for preferring C over C++ David Brown <david.brown@hesbynett.no> - 2014-10-28 08:45 +0100
Re: validity of ... reasons for preferring C over C++ Paul Rubin <no.email@nospam.invalid> - 2014-10-28 02:00 -0700
Re: validity of ... reasons for preferring C over C++ George Neuner <gneuner2@comcast.net> - 2014-10-30 11:56 -0400
Re: validity of ... reasons for preferring C over C++ upsidedown@downunder.com - 2014-10-28 19:59 +0200
Re: validity of ... reasons for preferring C over C++ David Brown <david.brown@hesbynett.no> - 2014-10-28 23:46 +0100
Re: validity of ... reasons for preferring C over C++ upsidedown@downunder.com - 2014-10-29 07:27 +0200
Re: validity of ... reasons for preferring C over C++ David Brown <david.brown@hesbynett.no> - 2014-10-29 10:11 +0100
Re: validity of ... reasons for preferring C over C++ Robert Wessel <robertwessel2@yahoo.com> - 2014-10-29 10:21 -0500
Re: validity of ... reasons for preferring C over C++ glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2014-10-29 20:15 +0000
Re: validity of ... reasons for preferring C over C++ Robert Wessel <robertwessel2@yahoo.com> - 2014-10-30 11:33 -0500
Re: validity of ... reasons for preferring C over C++ glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2014-10-30 19:07 +0000
Re: validity of ... reasons for preferring C over C++ Robert Wessel <robertwessel2@yahoo.com> - 2014-10-30 16:19 -0500
Re: validity of ... reasons for preferring C over C++ Nobody <nobody@nowhere.invalid> - 2014-10-31 07:32 +0000
Re: validity of ... reasons for preferring C over C++ glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2014-10-31 08:45 +0000
Re: validity of ... reasons for preferring C over C++ Reinhardt Behm <rbehm@hushmail.com> - 2014-10-31 18:15 +0800
Re: validity of ... reasons for preferring C over C++ glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2014-10-31 22:03 +0000
Re: validity of ... reasons for preferring C over C++ Robert Wessel <robertwessel2@yahoo.com> - 2014-10-31 09:53 -0500
Re: validity of ... reasons for preferring C over C++ glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2014-10-31 22:17 +0000
Re: validity of ... reasons for preferring C over C++ Les Cargill <lcargill99@comcast.com> - 2014-10-31 17:50 -0500
Re: validity of ... reasons for preferring C over C++ Nobody <nobody@nowhere.invalid> - 2014-10-28 04:37 +0000
Re: validity of ... reasons for preferring C over C++ Stefan Reuther <stefan.news@arcor.de> - 2014-10-21 19:12 +0200
Re: validity of ... reasons for preferring C over C++ Dave Nadler <drn@nadler.com> - 2014-10-21 15:06 -0700
Re: validity of ... reasons for preferring C over C++ Stefan Reuther <stefan.news@arcor.de> - 2014-10-22 19:06 +0200
Page 3 of 6 — ← Prev page 1 2 [3] 4 5 6 Next page →
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2014-10-19 14:07 +0200 |
| Message-ID | <m209ig$db1$1@dont-email.me> |
| In reply to | #18817 |
On 19/10/14 09:43, Niklas Holsti wrote: > On 14-10-18 00:03 , David Brown wrote: >> On 17/10/14 19:15, Niklas Holsti wrote: >>> On 14-10-17 13:44 , David Brown wrote: >>>> On 17/10/14 11:35, Paul Rubin wrote: >>>>> David Brown <david.brown@hesbynett.no> writes: >>>>>> I disagree, in the embedded world. In PC programming, I agree - very >>>>>> often you are better with a language like Python than with C or C++. >>>>> >>>>> I have to think that even in MCU programming there have to be better >>>>> alternatives to C or C++. Ada seems like a possibility except that the >>>>> toolchains are either obscure or very expensive. There have been >>>>> some C >>>>> dialects like Cyclone that were clever but never got traction. And I >>>>> guess there are some specialty EDSL's like Atom that aren't so good for >>>>> general purpose development. Forth is interesting but it's from a >>>>> different world, and still unsafe though with fewer traps than C. >>>>> >>>> >>>> In theory, one could do much better than C or C++ - but not in practice. >>>> For some systems, Ada is a possible choice. But while Ada is "safer" >>>> than C in some ways, it has its own problems >>> >>> Care to list a few of those? Just to have a good debate? Been a while... >> >> My experience with Ada is rather limited, so you might end up teaching >> me rather than getting a good debate. But of course others will no >> doubt join in. > > Let the flames roar! :-) > I'm snipping the rest of your post, because I am going to need to read up about Ada again before I can reply properly - the little Ada I learned was too long ago for me to give you a proper argument. But so far I can see that it looks like Ada is not as verbose as I believed, and is certainly worth considering more closely.
[toc] | [prev] | [next] | [standalone]
| From | Paul Rubin <no.email@nospam.invalid> |
|---|---|
| Date | 2014-10-19 19:47 -0700 |
| Message-ID | <7xfvejsbis.fsf@ruckus.brouhaha.com> |
| In reply to | #18829 |
David Brown <david.brown@hesbynett.no> writes: > I'm snipping the rest of your post, because I am going to need to read > up about Ada again before I can reply properly - the little Ada I > learned was too long ago for me to give you a proper argument. But so > far I can see that it looks like Ada is not as verbose as I believed, > and is certainly worth considering more closely. Here's an old article comparing development costs between C vs Ada: http://archive.adaic.com/intro/ada-vs-c/cada_art.html And here's a guide to Ada for C and C++ programmers: http://adahome.com/Ammo/cpp2ada.html Both are somewhat out of date (they are way before Ada 2012) and both are from a pro-Ada perspective, but I found them interesting.
[toc] | [prev] | [next] | [standalone]
| From | Niklas Holsti <niklas.holsti@tidorum.invalid> |
|---|---|
| Date | 2014-10-20 06:55 +0300 |
| Message-ID | <cajfctFbplvU1@mid.individual.net> |
| In reply to | #18838 |
On 14-10-20 05:47 , Paul Rubin wrote:
> Here's an old article comparing development costs between C vs Ada:
>
> http://archive.adaic.com/intro/ada-vs-c/cada_art.html
...
> Both are somewhat out of date (they are way before Ada 2012) and
> both are from a pro-Ada perspective, but I found them interesting.
I'm curious to know why you feel that the Zeigler article is from a
"pro-Ada perspective". To me it seems that the article tries hard to
understand what reasons, other than the language, could explain the
differences it reports, such as different competence of programmers,
different complexity of modules, etc.
The study was indeed done within a company that developed and sold Ada
compilers, but it also sold C and C++ compilers, I believe, so I
wouldn't automatically assume a bias.
--
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
. @ .
[toc] | [prev] | [next] | [standalone]
| From | Paul Rubin <no.email@nospam.invalid> |
|---|---|
| Date | 2014-10-19 21:02 -0700 |
| Message-ID | <7xbnp775i4.fsf@ruckus.brouhaha.com> |
| In reply to | #18839 |
Niklas Holsti <niklas.holsti@tidorum.invalid> writes: > I'm curious to know why you feel that the Zeigler article is from a > "pro-Ada perspective". Well, ok, I got both links from a pro-Ada site (adahome.com). It's been a while since I read the Ziegler article but its conclusion was favorable to Ada.
[toc] | [prev] | [next] | [standalone]
| From | britt.snodgrass@gmail.com |
|---|---|
| Date | 2014-10-20 04:02 -0700 |
| Message-ID | <4fcfe0b5-616c-42db-9dc9-e301be1e034b@googlegroups.com> |
| In reply to | #18840 |
On Monday, October 20, 2014 12:02:43 AM UTC-4, Paul Rubin wrote: > > Well, ok, I got both links from a pro-Ada site (adahome.com). It's been > "AdaHome is (sadly) a zombie site. Its accessible by not updated in well over a decade. It is sometimes useful as an archive of old stuff. A better place to start today is http://www.adaic.org.
[toc] | [prev] | [next] | [standalone]
| From | Niklas Holsti <niklas.holsti@tidorum.invalid> |
|---|---|
| Date | 2014-10-20 18:51 +0300 |
| Message-ID | <cakpcdFme7aU1@mid.individual.net> |
| In reply to | #18840 |
On 14-10-20 07:02 , Paul Rubin wrote:
> Niklas Holsti <niklas.holsti@tidorum.invalid> writes:
>> I'm curious to know why you feel that the Zeigler article is from a
>> "pro-Ada perspective".
>
> Well, ok, I got both links from a pro-Ada site (adahome.com). It's been
> a while since I read the Ziegler article but its conclusion was
> favorable to Ada.
Ok -- I thought you meant a "pro-Ada perspective" in the sense of being
biased or slanted in favour of Ada, but I misunderstood you.
This reminds me of a post on comp.lang.ada, several years ago. The
poster, who was a student, was tasked with writing a seminar
presentation or an essay (I forget which) comparing the relative
benefits of C and Ada, and wanted to present a "balanced view" but was a
bit desperate because all available reports were in Ada's favour...
IIRC, the people on comp.lang.ada could not help the poster find any
articles reporting comparisons favorable to C. That doesn't prove
anything, of course.
--
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
. @ .
[toc] | [prev] | [next] | [standalone]
| From | Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> |
|---|---|
| Date | 2014-10-21 00:30 +0000 |
| Subject | C and Ada, was: Re: validity of ... reasons for preferring C over C++ |
| Message-ID | <m249fq$aqj$1@dont-email.me> |
| In reply to | #18851 |
On 2014-10-20, Niklas Holsti <niklas.holsti@tidorum.invalid> wrote: > > This reminds me of a post on comp.lang.ada, several years ago. The > poster, who was a student, was tasked with writing a seminar > presentation or an essay (I forget which) comparing the relative > benefits of C and Ada, and wanted to present a "balanced view" but was a > bit desperate because all available reports were in Ada's favour... > IIRC, the people on comp.lang.ada could not help the poster find any > articles reporting comparisons favorable to C. That doesn't prove > anything, of course. > The only positive thing in favour of C is that the C compilers will generate code for, and run on, a lot more targets and platforms than the Ada compilers will. As Niklas is probably aware, this is a _major_ annoyance of mine because it means you can't write portable library code in Ada which will be guaranteed to run in a large range of environments, especially embedded ones. However, you do have this assurance with C code. Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world
[toc] | [prev] | [next] | [standalone]
| From | Les Cargill <lcargill99@comcast.com> |
|---|---|
| Date | 2014-10-20 20:49 -0500 |
| Subject | Re: C and Ada, was: Re: validity of ... reasons for preferring C over C++ |
| Message-ID | <m24e31$cu2$1@dont-email.me> |
| In reply to | #18859 |
Simon Clubley wrote: > On 2014-10-20, Niklas Holsti <niklas.holsti@tidorum.invalid> wrote: >> >> This reminds me of a post on comp.lang.ada, several years ago. The >> poster, who was a student, was tasked with writing a seminar >> presentation or an essay (I forget which) comparing the relative >> benefits of C and Ada, and wanted to present a "balanced view" but was a >> bit desperate because all available reports were in Ada's favour... >> IIRC, the people on comp.lang.ada could not help the poster find any >> articles reporting comparisons favorable to C. That doesn't prove >> anything, of course. >> > > The only positive thing in favour of C is that the C compilers will > generate code for, and run on, a lot more targets and platforms than > the Ada compilers will. > > As Niklas is probably aware, this is a _major_ annoyance of mine > because it means you can't write portable library code in Ada which > will be guaranteed to run in a large range of environments, especially > embedded ones. However, you do have this assurance with C code. > > Simon. > Aren't there Ada toolchains that emit as a target language 'C'? That would at leas allow tweaking #pragmas and such to get thing shoehorned into the toolchain. -- Les Cargill
[toc] | [prev] | [next] | [standalone]
| From | Jacob Sparre Andersen <jacob@jacob-sparre.dk> |
|---|---|
| Date | 2014-10-21 09:11 +0200 |
| Subject | Re: C and Ada, was: Re: validity of ... reasons for preferring C over C++ |
| Message-ID | <87siihx5fv.fsf@adaheads.sparre-andersen.dk> |
| In reply to | #18861 |
Les Cargill wrote: > Aren't there Ada toolchains that emit as a target language 'C'? That > would at leas allow tweaking #pragmas and such to get thing shoehorned > into the toolchain. There exists one such Ada compiler that I know of (and possibly two more I've heard rumors of). The one I know of (AdaMagic) is rather expensive, so I've never actually used it for a project. So far, it has been cheaper to spend the extra time writing C myself. Greetings, Jacob -- "Facts are stubborn, but statistics are more pliable." -- Mark Twain
[toc] | [prev] | [next] | [standalone]
| From | Les Cargill <lcargill99@comcast.com> |
|---|---|
| Date | 2014-10-21 08:34 -0500 |
| Subject | Re: C and Ada, was: Re: validity of ... reasons for preferring C over C++ |
| Message-ID | <m25ncd$a5v$2@dont-email.me> |
| In reply to | #18862 |
Jacob Sparre Andersen wrote: > Les Cargill wrote: > >> Aren't there Ada toolchains that emit as a target language 'C'? That >> would at leas allow tweaking #pragmas and such to get thing shoehorned >> into the toolchain. > > There exists one such Ada compiler that I know of (and possibly two more > I've heard rumors of). The one I know of (AdaMagic) is rather > expensive, so I've never actually used it for a project. So far, it has > been cheaper to spend the extra time writing C myself. > Ah. Oh well. Isn't that just the story of Ada, though? We've always been too cheap to buy it. > Greetings, > > Jacob > -- Les Cargill
[toc] | [prev] | [next] | [standalone]
| From | Niklas Holsti <niklas.holsti@tidorum.invalid> |
|---|---|
| Date | 2014-10-19 21:23 +0300 |
| Message-ID | <caidsvF3sk0U1@mid.individual.net> |
| In reply to | #18751 |
On 14-10-18 00:03 , David Brown wrote:
> On 17/10/14 19:15, Niklas Holsti wrote:
>> On 14-10-17 13:44 , David Brown wrote:
>>> On 17/10/14 11:35, Paul Rubin wrote:
>>>> David Brown <david.brown@hesbynett.no> writes:
>>>>> I disagree, in the embedded world. In PC programming, I agree - very
>>>>> often you are better with a language like Python than with C or C++.
>>>>
>>>> I have to think that even in MCU programming there have to be better
>>>> alternatives to C or C++. Ada seems like a possibility except that the
>>>> toolchains are either obscure or very expensive. There have been
>>>> some C
>>>> dialects like Cyclone that were clever but never got traction. And I
>>>> guess there are some specialty EDSL's like Atom that aren't so good for
>>>> general purpose development. Forth is interesting but it's from a
>>>> different world, and still unsafe though with fewer traps than C.
>>>>
>>>
>>> In theory, one could do much better than C or C++ - but not in practice.
>>> For some systems, Ada is a possible choice. But while Ada is "safer"
>>> than C in some ways, it has its own problems
>>
>> Care to list a few of those? Just to have a good debate? Been a while...
>
> My experience with Ada is rather limited, so you might end up teaching
> me rather than getting a good debate. But of course others will no
> doubt join in.
>
> An obvious (but highly subjective) irritation with Ada is the verbosity
> of the language - lots of things need repeated,
Oh yes, I now remember one common place where Ada needs repetition: Ada
does not have the combinations of assignment and operation, such as +=,
that C provides. So where one can increment a C variable by x += 1, or
x++, or ++x, in Ada one must write x := x + 1, or define one's own
increment procedure and write inc(x). Same for decrement and other
arithmetic operations.
Moreover, Ada does not have the "<<" and ">>" operators for left and
right shifts; they are functions in the library package Interfaces,
called Shift_Left and other verbose names.
--
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
. @ .
[toc] | [prev] | [next] | [standalone]
| From | Nobody <nobody@nowhere.invalid> |
|---|---|
| Date | 2014-10-20 03:39 +0100 |
| Message-ID | <pan.2014.10.20.02.39.48.867000@nowhere.invalid> |
| In reply to | #18751 |
On Fri, 17 Oct 2014 23:03:24 +0200, David Brown wrote:
> An obvious (but highly subjective) irritation with Ada is the verbosity
> of the language
One argument in favour of verbosity is that it increases the "distance"
between distinct, valid programs, thus reducing the probability that a
typo will go unnoticed.
A good example of this is to consider two fragments of C code:
A:
if (condition)
{
...
}
B:
if (condition);
{
...
}
The syntactic difference is a semicolon; the semantic difference is vast.
In C, a statement is a statement: anywhere a statement can appear,
*any* statement can appear.
A similar issue arises for expressions. In particular, assignment (=) and
equality comparison (==) are both expressions, and can appear almost
anywhere that any expression can appear. The fact that there's no distinct
boolean type doesn't help here (nor if you confuse & with && or | with ||).
[toc] | [prev] | [next] | [standalone]
| From | Tom Gardner <spamjunk@blueyonder.co.uk> |
|---|---|
| Date | 2014-10-17 12:07 +0100 |
| Message-ID | <4M60w.557220$9I4.8191@fx35.am4> |
| In reply to | #18702 |
On 17/10/14 10:35, Paul Rubin wrote: >Forth is interesting but it's from a > different world, and still unsafe though with fewer traps than C. That's actually quite a strong point in Forth's favour.
[toc] | [prev] | [next] | [standalone]
| From | Tom Gardner <spamjunk@blueyonder.co.uk> |
|---|---|
| Date | 2014-10-17 12:06 +0100 |
| Message-ID | <dL60w.557204$9I4.49334@fx35.am4> |
| In reply to | #18701 |
On 17/10/14 10:19, David Brown wrote: > On 17/10/14 10:29, Tom Gardner wrote: >> On 17/10/14 08:27, David Brown wrote: >>> If you don't know what your C++ code is doing, that's /your/ problem, >>> not the language's problem. >> >> Well yes. But some languages do have more obscured traps that >> that require higher levels of skill and more continual alertness. >> >> The interesting question is always "given circumstances X, is >> Y or Z the more appropriate language". >> >> One of the problems with modern C and C compilers (compared with >> K&R C) is that their sophistication places far more subtle traps >> that require language lawyers to understand. When even the language >> lawyers disagree amongst themselves, that's not a good starting >> point. > > If you were purely discussing the compilers, then I might partially > agree - modern compilers are more advanced and have more optimisations > than old tools that were closer to C-to-assembly translators. So there > are issues, such as aliasing problems, that can make code that /looks/ > correct behave incorrectly with modern tools. > > Countering that, modern C is a better language - for example, it > requires proper function declaration, which eliminates a source of > obscure problems in K&R C. And modern tools are far better at static > error checking and spotting issues that sailed past unnoticed in the > "good old days" - as long as you know how to use your tools, you will > write safer code with fewer bugs using modern tools. I agree with all that, but I will note that back in the "good old days" <cough> it was a truism that "cc is only half a compiler; the other half is lint". > Yes, there are fine points in the "law" that lead to disagreement > amongst the "lawyers". The way to handle this is simple - the same way > as it has always been handled, and the same way you suggest below. > Avoid using such constructs or language features. > > The same applies with C++, which has more scope for confusion and > complications (such as figuring out exactly which template instantiation > will be used). If you are not sure, don't write code that you don't > understand. Ach! That's a problem in the trenches. Too many people don't know that they don't understand the features. They /think/ they know and so shoot other people in the foot. The only "work-around" for that is to have systems with fewer surprises, and to restrict the use of "dangerous" tools to those that have previously and repeatedly demonstrated that they can use them safely. Not palatable. I've forgotten the name for the generic phenomenon that the ignorant think they are better than they actually are. If anyone can come up with a decent way of allowing people to realise what they don't know, then they have probably found a way of making themselves very famous, rich, and winning all sorts of prizes. One of my few saving graces is that I have some clue what I don't know. >> K&R C had 228 pages. C Traps and Pitfalls had 228 pages. They >> were all you needed in the 80. How long are the modern equivalents? >> >> So I will assert that nowadays there are fewer circumstances in >> which C/C++ is the best choice for circumstances X. > > I disagree, in the embedded world. In PC programming, I agree - very > often you are better with a language like Python than with C or C++. Agreed, but I'd like to have a good reason to take a hard look at Lua. >> But I will >> add two important caveats: carefully-chosen language subsets >> significantly mitigate the problems, and interoperability with >> existing code bases dictate the language (the COBOL problem/argument). > Yes (to both).
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2014-10-17 14:12 +0200 |
| Message-ID | <m1r13i$5n7$1@dont-email.me> |
| In reply to | #18705 |
On 17/10/14 13:06, Tom Gardner wrote: > On 17/10/14 10:19, David Brown wrote: >> In PC programming, I agree - very >> often you are better with a language like Python than with C or C++. > > Agreed, but I'd like to have a good reason to take a hard look at Lua. > One good reason is that it is relatively easy to integrate Lua into a C program, even an embedded system. I managed it a number of years ago, even though I know little of Lua (it's high on my "things to learn when I get the time" list).
[toc] | [prev] | [next] | [standalone]
| From | Tom Gardner <spamjunk@blueyonder.co.uk> |
|---|---|
| Date | 2014-10-17 13:16 +0100 |
| Message-ID | <yM70w.646115$m41.107435@fx34.am4> |
| In reply to | #18711 |
On 17/10/14 13:12, David Brown wrote: > On 17/10/14 13:06, Tom Gardner wrote: >> On 17/10/14 10:19, David Brown wrote: > >>> In PC programming, I agree - very >>> often you are better with a language like Python than with C or C++. >> >> Agreed, but I'd like to have a good reason to take a hard look at Lua. >> > > One good reason is that it is relatively easy to integrate Lua into a C > program, even an embedded system. I managed it a number of years ago, > even though I know little of Lua (it's high on my "things to learn when > I get the time" list). Just so. It might turn out to be a reasonable way of avoiding some, but not all, of the disadvantages of myScrottyLittleDSL (TM). But that's a separate discussion!
[toc] | [prev] | [next] | [standalone]
| From | Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> |
|---|---|
| Date | 2014-10-17 14:13 +0200 |
| Message-ID | <5378b$54410803$5f6173bc$6678@abuse.newsxs.nl> |
| In reply to | #18705 |
On 2014-10-17 Tom Gardner wrote in comp.arch.embedded: > > I've forgotten the name for the generic phenomenon that the ignorant > think they are better than they actually are. If anyone > can come up with a decent way of allowing people to realise what > they don't know, then they have probably found a way of making > themselves very famous, rich, and winning all sorts of prizes. Ignorance is Bliss? Just remembered a good articile on the subject: http://www.nytimes.com/2000/01/18/health/among-the-inept-researchers-discover-ignorance-is-bliss.html -- Stef (remove caps, dashes and .invalid from e-mail address to reply by mail) Every time you manage to close the door on Reality, it comes in through the window.
[toc] | [prev] | [next] | [standalone]
| From | Arlet Ottens <usenet+5@c-scape.nl> |
|---|---|
| Date | 2014-10-17 14:35 +0200 |
| Message-ID | <54410d09$0$2938$e4fe514c@news.xs4all.nl> |
| In reply to | #18713 |
On 10/17/2014 02:13 PM, Stef wrote: > On 2014-10-17 Tom Gardner wrote in comp.arch.embedded: >> >> I've forgotten the name for the generic phenomenon that the ignorant >> think they are better than they actually are. If anyone >> can come up with a decent way of allowing people to realise what >> they don't know, then they have probably found a way of making >> themselves very famous, rich, and winning all sorts of prizes. > > Ignorance is Bliss? > > Just remembered a good articile on the subject: > http://www.nytimes.com/2000/01/18/health/among-the-inept-researchers-discover-ignorance-is-bliss.html > Dunning-Kruger effect.
[toc] | [prev] | [next] | [standalone]
| From | Tom Gardner <spamjunk@blueyonder.co.uk> |
|---|---|
| Date | 2014-10-17 13:59 +0100 |
| Message-ID | <Yo80w.557246$9I4.395851@fx35.am4> |
| In reply to | #18714 |
On 17/10/14 13:35, Arlet Ottens wrote: > On 10/17/2014 02:13 PM, Stef wrote: >> On 2014-10-17 Tom Gardner wrote in comp.arch.embedded: >>> >>> I've forgotten the name for the generic phenomenon that the ignorant >>> think they are better than they actually are. If anyone >>> can come up with a decent way of allowing people to realise what >>> they don't know, then they have probably found a way of making >>> themselves very famous, rich, and winning all sorts of prizes. >> >> Ignorance is Bliss? >> >> Just remembered a good articile on the subject: >> http://www.nytimes.com/2000/01/18/health/among-the-inept-researchers-discover-ignorance-is-bliss.html >> > > Dunning-Kruger effect. I award you one jelly baby ;} The effect is a real, serious problem for the "don't do something unless you understand it" type of argument.
[toc] | [prev] | [next] | [standalone]
| From | Wouter van Ooijen <wouter@voti.nl> |
|---|---|
| Date | 2014-10-17 17:06 +0200 |
| Message-ID | <5441308c$0$15855$e4fe514c@dreader35.news.xs4all.nl> |
| In reply to | #18713 |
Stef schreef op 17-Oct-14 2:13 PM: > On 2014-10-17 Tom Gardner wrote in comp.arch.embedded: >> >> I've forgotten the name for the generic phenomenon that the ignorant >> think they are better than they actually are. If anyone >> can come up with a decent way of allowing people to realise what >> they don't know, then they have probably found a way of making >> themselves very famous, rich, and winning all sorts of prizes. > > Ignorance is Bliss? Bliss? That was a real language for real programmers! ;) Wouter
[toc] | [prev] | [next] | [standalone]
Page 3 of 6 — ← Prev page 1 2 [3] 4 5 6 Next page →
Back to top | Article view | comp.arch.embedded
csiph-web