Re: C / C++ skills
- From: "Eric" <englere_geo@xxxxxxxxx>
- Date: 15 Aug 2006 10:49:11 -0700
mc wrote:
That is why I like Pascal-like languages (including C#, which has C-like
syntax but Pascal-like semantics).
Agreed. I've used Delphi since version 1, and TP before that. I've also
done a lot of C, mostly with unix and embedded projects. In general you
need to spend more time debugging C code, and by a wide margin in some
cases.
We don't have a good version of .NET to target small embedded MCUs yet.
There was a company making a CLR for embedded targets but they went
under because their pricing model wasn't attractive for small companies
(http://www.windowsfordevices.com/news/NS4666205829.html). There's also
an open source CLR for the H8 as used in the first Lego robotics set,
but that's pretty weak.
I was thinking of making a CLR for embedded devices, where the JIT
would be done on the PC to target the MCU. I'd also consider using
static memory allocation, since the small targets I have in mind don't
lend themselves well to a background thread or process that manages
memory. In many cases with embedded OOP you end up with static classes,
instead of instances, since instances aren't needed for simple control
applications, and this greatly simplifies memory management. You only
allocate static classes once, and you never need to de-allocate them.
C is better than assembly language, but not a lot better. Most of the
unreliability of software as we know it is due to C, with its lack of
bounds-checking, uninitialized pointers, etc.
I think of C as being mostly a portable assembly language. And that's a
good thing when you need to get close to the hardware. C's pointers are
both it's best feature and it's worst feature. That's one reason why
lint programs are so helpful.
C# allows strongly typed references, which are akin to pointers. And
unlike the Java Virtual Machine, the .NET CLR supports the concept to
dereferencing pointers, making it suitable as a C target. An embedded
CLR could support both C# and C.
Eric
.
- Follow-Ups:
- Re: C / C++ skills
- From: mc
- Re: C / C++ skills
- References:
- C / C++ skills
- From: russellseres@xxxxxxxxx
- Re: C / C++ skills
- From: Widget
- Re: C / C++ skills
- From: Eric
- Re: C / C++ skills
- From: mc
- C / C++ skills
- Prev by Date: Re: Atmel press release for ARM9 with flash
- Next by Date: Re: C / C++ skills
- Previous by thread: Re: C / C++ skills
- Next by thread: Re: C / C++ skills
- Index(es):
Relevant Pages
|