Re: C vs C++ in Embedded Systems?
From: Jonathan Kirwan (jkirwan_at_easystreet.com)
Date: 01/31/05
- Next message: Chris Hills: "Re: Microcontroller development environment with C/C++ compiler support for a freshman mechatronic student"
- Previous message: Jim Granville: "Re: PSoC questions"
- In reply to: Grant Edwards: "Re: C vs C++ in Embedded Systems?"
- Next in thread: Grant Edwards: "Re: C vs C++ in Embedded Systems?"
- Reply: Grant Edwards: "Re: C vs C++ in Embedded Systems?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 31 Jan 2005 22:02:42 GMT
On 31 Jan 2005 21:35:18 GMT, Grant Edwards <grante@visi.com> wrote:
>On 2005-01-31, Jonathan Kirwan <jkirwan@easystreet.com> wrote:
>
>> Despite all this, though. There are real reasons and good
>> justifications for treating C++ in embedded systems with a
>> great deal of respect and perhaps some trepidation. I think
>> using it well imposes a higher standard of expertise on the
>> programmer. It's a language for the more skilled among us.
>
>Which seems to me to illustrate a the fundamental problem with
>C++. The higher level the language, the _less_ skill and
>expertise should be required of the programmer. Writing
>Assembly code should require less expertise than writing
>machine code. Writing C code should require less expertise than
>Assembly. Writing in an higher level language (OO or not)
>should require _less_ expertise than C, not more. I think
>that's true for most high level languages: Modula-3, Ada,
>Scheme, Python, Smalltalk, etc.
>
>The fact that writing C++ is more difficult and requires more
>expertise than writing in a lower level language means
>something went seriously wrong in the design of C++. The
>purpose of a language is to make it easier to program, not more
>difficult.
I meant my comments, though, in the very narrow situation of using C++ for
critical embedded applications of the nature I mentioned in my earlier post,
years back.
In the case of less critical systems, a great many programmers can use
Microsoft's MFC, for example, in order to handle window messaging and use the
supplied simplifying tools to modify the directing structures without really
understanding the details. It's blindly done, I suppose. But if one stays in
the mainstream, most problems can still be avoided, even by relatively ignorant
programmers.
Same thing is true for VB or Delphi, I suppose. Excellent tools for quick
prototyping, for example (not meant to exclude other meaningful uses.) There's
a lot that can be done with well-vetted higher level support. But then, I'd not
be trying to use these tools for the kind of critical embedded applications to
which I meant my comments to be directed.
...
However, between C++ and VB/Delphi, C++ still requires a fair degree of skill.
I kind of imagine C++ as a emeritus programmer's programming language. Often, a
very dangerous tool in neophyte hands and, yet, an incredibly powerful tool for
those nearer the pinnacle of the profession. One needs to have learned from
experience what works well over time and how to rule themselves with a
disciplinary iron fist. And that just takes time.
Jon
- Next message: Chris Hills: "Re: Microcontroller development environment with C/C++ compiler support for a freshman mechatronic student"
- Previous message: Jim Granville: "Re: PSoC questions"
- In reply to: Grant Edwards: "Re: C vs C++ in Embedded Systems?"
- Next in thread: Grant Edwards: "Re: C vs C++ in Embedded Systems?"
- Reply: Grant Edwards: "Re: C vs C++ in Embedded Systems?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|