Re: Hey, what is all this 'off topic' posting?
- From: keith <krw@xxxxxxxxxx>
- Date: Mon, 05 Sep 2005 22:01:05 -0400
On Mon, 05 Sep 2005 13:59:46 -0700, Bob Monsen wrote:
> On Mon, 05 Sep 2005 12:40:58 -0400, keith wrote:
>
>> On Sun, 04 Sep 2005 20:17:37 +0200, Frank Bemelman wrote:
>>
>>> [quoted text muted]
>>
>> Macros are far more than (even sort of) subroutines. They can do
>> conditional processing too. A few years back (when I was doign such
>> things) I had a set of x86 assmebler macros that would do PL/I-like
>> branch constructs (IF/THEN/ELSE, SELECT/WHEN in both forms, LOOP, UNTIL,
>> etc.). Assembler macros are *much* more than (sort of) subroutines. If
>> that's all you're using macros for, I can see why you don't much like ASM.
>
> It's the duckling syndrome. We always love whatever we bonded to as a
> child.
Not at all. I had all of two weeks of PL/I in college and perhaps another
week (40 hours class) OTJ. Otherwise I've never used it. I *do* like
PL/I language constructs though. Pascal, I was moderatley comfortable
with. I was riased with Fortran, so Basic is trivial. ASM is comfortable
because that's what I do; sling bits. I really don't care what the
processor is, it's a small learning curve to be productive
(particularly the embedded stuff). VHDL is nice because it's *NOT* 'C'. ;-)
> I like C because it's what I 'grew up' with. I've done lots of asm
> coding, but it is always painful when I have to hack out the loop
> control structures yet again using compare and branch instructions (or
> write the macros using some arcane assembler to do that on a new
> architecture), or explicitly allocate and reuse local variables, or
> remember which status bits get whacked by which instructions, or try to
> remember the calling registers or stack allocation for a called routine.
You're not structured enough. It's been years since I had problems with
asm stuff, yet 'C' will allow even the most experienced programmer to
shoot himself with pointers without knowing better. I can't tell you the
number of times we have hard crashes going form one OS (or compiler)
version to another because different assumptions are made WRT pointers.
Crappy programming, agreed. I don't see experienced ASM programmers
making the same stupid mistakes. They *know* what a pointer is and to
treat it with respect.
> C does all this for you, at a small price in efficiency, but doesn't get
> in your way like many other HLLs. I think the level of abstraction is
> just right for most software that touches hardware. That is probably why
> most OS, driver, and embedded software is written in it, and has been
> for 25 years. If you need more speed or more space, there are hard core
> optimization options, and you can always profile and optimize by hand in
> assembler.
I dissagree. Most work that touches hardware is done in 'C' because
programmers are too dumbed down. ;-)
> Yet another good thing about C is that it's pretty standard. Nearly
> everybody can read it after a few minutes instruction (unless you've
> macroized it to look like cobol) Assembler with macros tends to look
> like a private language, and intuiting higher level structures can be
> daunting.
Hmm, tell that to IBM. MVS is written in PL/S (or PL/AS), which isn't
much more than a macro language on top of 370 assembler. If the macros
are written correctly, they work just fine.
> C was designed to be a portable assembly language,
I'd like to see you argue that point over on comp.sci. They chew people
up with that attitude (though personally I don't disagree, much).
> and, in my opinion,
> does a great job at that task, and many others. Quick to write, often
> portable, easy to read, handles annoying details that can be the source
> of bugs, but lets you whack away at hardware without trying to protect
> you from yourself. Flexible, malleable, can be used to write drivers,
> operating systems, or AI. It's a good language.
It sucks as an embedded language. It might be OK (with the ++ crap added
on top) for UI stuff, but it is crap as an embedded language.
--
Keith
.
- Follow-Ups:
- Re: Hey, what is all this 'off topic' posting?
- From: Bob Monsen
- Re: Hey, what is all this 'off topic' posting?
- References:
- Hey, what is all this 'off topic' posting?
- From: Bob Monsen
- Re: Hey, what is all this 'off topic' posting?
- From: SioL
- Re: Hey, what is all this 'off topic' posting?
- From: Frank Bemelman
- Re: Hey, what is all this 'off topic' posting?
- From: keith
- Re: Hey, what is all this 'off topic' posting?
- From: Ken Smith
- Re: Hey, what is all this 'off topic' posting?
- From: Frank Bemelman
- Re: Hey, what is all this 'off topic' posting?
- From: keith
- Re: Hey, what is all this 'off topic' posting?
- From: Bob Monsen
- Hey, what is all this 'off topic' posting?
- Prev by Date: Re: PRIORITY SEARCH: Analog Electric Engineer
- Next by Date: Re: Is New Orleans finished ?
- Previous by thread: Re: Hey, what is all this 'off topic' posting?
- Next by thread: Re: Hey, what is all this 'off topic' posting?
- Index(es):
Relevant Pages
|