[comp.sys.amiga.advocacy] Assembly Language & Programming

rjc@geech.gnu.ai.mit.edu (Ray Cromwell) (04/11/91)

In article <ben.5806@epmooch.UUCP> ben@epmooch.UUCP (Rev. Ben A. Mesander) writes:
>>In article <1991Apr10.000254.24530@mintaka.lcs.mit.edu> rjc@geech.gnu.ai.mit.edu (Ray Cromwell) writes:
>[...]
>>With data abtraction, you can operate on structures and not
>>even know what's inside them!
>
>Hah! I can do this is almost any language! I don't need C++ to help me do
>that!
>
>Folks, take this thread to comp.sys.amiga.religion or .flame or whatever
>K*nt decided to call it. Or some other group. This is for the discussion
>of Amiga programming, not the One True Programming Language.

  Now if you change the name or delete structure elements. For instance,
if intuition was object oriented and struct Window was a class with
a lot of private members(for instance the layer pointer)  C= could change
the type, name, or move the Layer pointer entirely without breaking
future software. I don't think C++ is the best OOP, I'm merely arguing
that different programming paradigms (OOP, Functional, Imperative, Iconic,...)
all have their uses.

>--
>| ben@epmooch.UUCP   (Ben Mesander)       | "Cash is more important than |
>| ben%servalan.UUCP@uokmax.ecn.uoknor.edu |  your mother." - Al Shugart, |
>| !chinet!uokmax!servalan!epmooch!ben     |  CEO, Seagate Technologies   |


--
/~\_______________________________________________________________________/~\
|n|   rjc@albert.ai.mit.edu   Amiga, the computer for the creative mind.  |n|
|~|                                .-. .-.                                |~|
|_|________________________________| |_| |________________________________|_|

pl@hakki.cs.tut.fi (Lehtinen Pertti) (04/11/91)

From article <1991Apr10.191050.4311@mintaka.lcs.mit.edu>, by rjc@geech.gnu.ai.mit.edu (Ray Cromwell):
> 
>   Now if you change the name or delete structure elements. For instance,
> if intuition was object oriented and struct Window was a class with
> a lot of private members(for instance the layer pointer)  C= could change
> the type, name, or move the Layer pointer entirely without breaking
> future software. I don't think C++ is the best OOP, I'm merely arguing
> that different programming paradigms (OOP, Functional, Imperative,Iconic,...)
> all have their uses.
> 

	This is correct. You can always do all things on all languages.
	Question is how much time you have to spend on doing it and this
	depends on how well your language supports your goals.

	On assembly you can do everything, but assembly doesn't support
	anything. So, if I am going to do some OOP (or anything else), 
	I would very likely find tools for it.

	Lack of support usually means lack of structure. If your tools
	don't support OOP, you very likely shall give it up at some
	point in the name of {speed|simplicity|...} and that fact
	could some day bite you back.

	Of course we must remember, that if we program games, we are
	quite likely building a program for single use. If we are *never*
	going to port it or expand it anyway, why should we care about
	readability or structure or anything? It is only matter of taste.
	Some people like to write pretty programs. Some only hack them
	working. It works now, DO NOT TOUCH IT!

--
pl@cs.tut.fi				! All opinions expressed above are
Pertti Lehtinen				! purely offending and in subject
Tampere University of Technology	! to change without any further
Software Systems Laboratory		! notice

rjc@geech.gnu.ai.mit.edu (Ray Cromwell) (04/11/91)

In article <1991Apr11.111817.29529@funet.fi> pl@hakki.cs.tut.fi (Lehtinen Pertti) writes:
>
>From article <1991Apr10.191050.4311@mintaka.lcs.mit.edu>, by rjc@geech.gnu.ai.mit.edu (Ray Cromwell):
>> 
>>   Now if you change the name or delete structure elements. For instance,
>> if intuition was object oriented and struct Window was a class with
>> a lot of private members(for instance the layer pointer)  C= could change
>> the type, name, or move the Layer pointer entirely without breaking
>> future software. I don't think C++ is the best OOP, I'm merely arguing
>> that different programming paradigms (OOP, Functional, Imperative,Iconic,...)
>> all have their uses.
>> 
>
>	This is correct. You can always do all things on all languages.
>	Question is how much time you have to spend on doing it and this
>	depends on how well your language supports your goals.
>
>	On assembly you can do everything, but assembly doesn't support
>	anything. So, if I am going to do some OOP (or anything else), 
>	I would very likely find tools for it.
>
>	Lack of support usually means lack of structure. If your tools
>	don't support OOP, you very likely shall give it up at some
>	point in the name of {speed|simplicity|...} and that fact
>	could some day bite you back.
>
>	Of course we must remember, that if we program games, we are
>	quite likely building a program for single use. If we are *never*
>	going to port it or expand it anyway, why should we care about
>	readability or structure or anything? It is only matter of taste.
>	Some people like to write pretty programs. Some only hack them
>	working. It works now, DO NOT TOUCH IT!

   Why not just program in binary? Use a machine language monitor and
just enter bits? Readability helps development time. It also makes
code easy to maintain.  
   Sometimes I modify old Unix code and believe me, it's a pain! Adding
in a new function should be easy right? Wrong. Sometimes you have to 
patch every source module. Even if you don't want to port something.
Making your code easy to read and commented will help you greatly. What
if your game sold well, and you wanted to make a sequel? I have assembly
source I wrote on some disks that is 2 years old. Sometimes I go back and
look at it, and think 'what the hell am I doing in this routine, what does
it do?' So I spend 15-30 minutes tracing code to find out what a routine does
that I coded myself because I forgot about it.
  Use the right tool for the job! I know people who program in machine 
language monitors exclusively and don't touch assembly. Are they using
the write tool? ASM programmers may argue, but there are some benefits
to programming in a monitor.
  Machine code is not the right language for every project, but some
ASM programmers on here disagree. I think it's because ASM is the only
language they know, an dthey haven't had a formal educational in CS.


>--
>pl@cs.tut.fi				! All opinions expressed above are
>Pertti Lehtinen				! purely offending and in subject
>Tampere University of Technology	! to change without any further
>Software Systems Laboratory		! notice


--
/~\_______________________________________________________________________/~\
|n|   rjc@albert.ai.mit.edu   Amiga, the computer for the creative mind.  |n|
|~|                                .-. .-.                                |~|
|_|________________________________| |_| |________________________________|_|