[comp.lang.misc] Reprise: Assembler Programming - Costs versus Benefits

peter@sugar.hackercorp.com (Peter da Silva) (12/07/90)

OK, the debate seems to be stalemated now. The main points seem to be:

	It takes longer to program in assembly.
	Assembly programming is strongly correlated with dangerous coding
		practices

	Programs in high-level languages run slower and are larger.
	High level programming is strongly correlated with code bloat.

Have I missed anything? I use the term "strongly correlated" to beg the
question of whether it's the technique that encourages the problem or
whether it's that people likely to write code with that problem are just
naturally attracted to the technique.

OK, so if code speed is a problem, or code size is a problem, go with ASM.
Writing an arcade game in C is Computer Scientist Machismo.

If the program is going to spend most of its time in the O/S or resident
libraries, go with a high level language. Writing an editor in assembly is
Computer Hacker Machismo.

Dangerous coding practices and code bloat is to be just plain discouraged.

I'm crossposting this to comp.lang.misc, and directing followups there,
because that's where this sort of discussion belongs. For the folks in
comp.lang.misc, portability isn't a concern because the programs involved
are inherently system dependant.
-- 
Peter da Silva.   `-_-'
<peter@sugar.hackercorp.com>.

stoller@cbmcel.UUCP (Martin S. Stoller) (12/10/90)

In article <7220@sugar.hackercorp.com> peter@sugar.hackercorp.com (Peter da Silva) writes:
>OK, the debate seems to be stalemated now. The main points seem to be:
>
>	It takes longer to program in assembly.
>	Assembly programming is strongly correlated with dangerous coding
>		practices
Add:	Assem Programmers know what the Hardware does (IF they are good),
	but have trouble with Multitasking Operating Systems...
>
>	Programs in high-level languages run slower and are larger.
>	High level programming is strongly correlated with code bloat.
Add:	Generally on't even know what a CHIP is... They assume it is something
	to eat.
	Know exactly (IF they are good) how to behave with the OS, and know
	how it is set up...
>
>Have I missed anything?
Almost got all, though you got the main points.
> I use the term "strongly correlated" to beg the
>question of whether it's the technique that encourages the problem or
>whether it's that people likely to write code with that problem are just
>naturally attracted to the technique.
The languages themselves (C and Assem) DO NOT force people to code in one way
or the other.  Some languages do, like Modula2, Pascal, etc...  Assem and C
are very close (c'me here, if you want to argue; I'm 210 Pounds (acctually 90Kg)
of muscle and brain); one needs a lot of time to teach oneself how to program
(not in any particular style) proparly.  High level languages are easy; you just
take the commands you have, and string them together... It is just plain
to bad if you nead a command you don't have :^).  
>OK, so if code speed is a problem, or code size is a problem, go with ASM.
>Writing an arcade game in C is Computer Scientist Machismo.
Writing a FAST arcade game in C is easy.  I can kill the system just as
easyilly in C as in Assem. Writing a FAST game in Modula2 or such is CSMachoism.
If you want proof of above statement, I can send it to you :^).  OK, so C uses
a wee bit more of the System resources, but what the #@^^.
>If the program is going to spend most of its time in the O/S or resident
>libraries, go with a high level language. Writing an editor in assembly is
		      ^^^^^^^^^^
>Computer Hacker Machismo.
Hm...  I've seen some good stuff in Assem:  Remember that Freeware thing,
the REQ.library?  It is part of CygnusEd (Which, I believe, was written in C).
The WHOLE library is PURE Assem (or so the Docs).
>Dangerous coding practices and code bloat is to be just plain discouraged.
Yep. In all LOW LEVEL languages.  C can be correctly written:  I've done 3
PD games (for a company here in Switzerland) and use C. Looking at the Program
size, they are very small, for what they do.  Most new C programmers bloat their
code; they use gotos and arrays (instead of 1 variable in a loop) etc... This
makes for unhealthy code, as one can imagine...
>I'm crossposting this to comp.lang.misc, and directing followups there,
>because that's where this sort of discussion belongs. For the folks in
>comp.lang.misc, portability isn't a concern because the programs involved
>are inherently system dependant.
Hm...  I have seen several AMIGA Games ported to other platforms (all 68000'er).
But I bet 'twas a hard job.
>-- 
>Peter da Silva.   `-_-'
><peter@sugar.hackercorp.com>.
.sig?  What's that?
My 2 cents CND...
-- 

   Regards,
   UUCP: [{(uunet|pyramid|rutgers)!cbmvax}!cbmehq!cbmcel!stoller