home *** CD-ROM | disk | FTP | other *** search
- Path: nef.ens.fr!drakkar!espie
- From: espie@drakkar.ens.fr (Marc Espie)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: FindTask() VERY IMPORTANT
- Date: 16 Mar 1996 14:42:04 GMT
- Organization: Ecole Normale Superieure, Paris
- Message-ID: <4iejvs$1b1@nef.ens.fr>
- References: <4hp3cv$cqe@serpens.rhein.de> <4i64pk$ia1@news.xs4all.nl> <4i74pb$b4f@serpens.rhein.de> <4ib9h0$i23@news.xs4all.nl>
- NNTP-Posting-Host: drakkar.ens.fr
-
- In article <4ib9h0$i23@news.xs4all.nl>,
- Marco Nelissen <marcone@xs1.xs4all.nl> wrote:
- >Michael van Elst (mlelstv@serpens.rhein.de) wrote:
- >: I can only repeat myself:
- >
- >So I've noticed...
- >
- >: If there is a system function for a task then use it instead of peeking
- >: data structures.
- >
- >SysBase->ThisTask is _R_E_A_D_A_B_L_E_, and always has been. Why shouldn't
- >I use it? If this suddenly fails on a new OS, so be it, but it won't be my
- >fault.
-
- `Programming is like sex. One mistake and you have to support it for life.'
-
- should be more prominent in the Guru Book in my opinion.
- The developpers at old Commodore have admitted time and time again that they
- made some mistakes in the design of AmigaOS. In the opinion of several, the
- biggest mistake they made was to allow the end-user to peek at many fields
- in system structures and even to fake some system structures...
-
- Just look around, find some information. Check the evolution of dos.library,
- of graphics.library. Look at all the functions that were added just to be able
- to examine some system structures safely.
-
- You probably don't remember all the time it took from 1.3 to 2.04, just to
- support these mistakes (one of the most difficult point was all the false
- seglists and user-built new processes...)
-
- Look, this has been the OFFICIAL point of view for a lot of time now.
- Did you ever read the general programming guidelines at the start of the RKMs ?
- Did you ever read developper docs ?
-
- With insight, one crucial rule they tried to enforce was:
-
- IF THERE EXISTS A SYSTEM FUNCTION TO PEEK/POKE/CREATE AT A SYSTEM STRUCTURE,
- USE IT. DON'T ROLL YOUR OWN.
-
- This is stated QUITE prominently if all `recent' docs coming from Commodore
- (RKM libraries 2.0, for instance).
-
- Yes, you can look at SysBase->ThisTask, yes it probably won't break in the
- future. But... what is your point ?
-
- Bottomline is, it's bad programming practice, as established by the guys
- who wrote the system.
- --
- [nosave]<http://www.eleves.ens.fr:8080/home/espie/index.html>
- microsoft network is EXPLICITLY forbidden to redistribute this message.
- `Moon purismu powa, make up.... Tsuki ni kawatte, oshiokiyo !'
- Marc Espie (Marc.Espie@ens.fr)
-