home *** CD-ROM | disk | FTP | other *** search
- Path: phoenix.rhein.de!yaps!arno
- From: arno@yaps.rhein.de (Arno Eigenwillig)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: PPC compilers
- Message-ID: <VBzVx*M3f@yaps.rhein.de>
- Date: Tue, 09 Jan 1996 14:15:21 +0100
- References: <john.hendrikx.40ka@grafix.xs4all.nl> <jasonb.820051107@cs.uwa.edu.au>
- <4c9i2l$h3i@sunsystem5.informatik.tu-muenchen.de> <4ck47h$g07@maureen.teleport.com>
- <19960106.4EE928.CF59@sisyphus.demon.co.uk> <4cokkg$415@maureen.teleport.com>
- <19960107.533250.14585@sisyphus.demon.co.uk> <4cqrti$f6u@maureen.teleport.com>
- Organization: Yet Another Private Site in Meckenheim, Germany
- X-Copyright: This article may not be distributed on a CD-ROM
- or in printed form without prior written consent of the author.
- X-Newsreader: Arn V 1.04
-
- In article <4cqrti$f6u@maureen.teleport.com>, Stephan Schaem writes:
-
- > I dunno , I just find it puzzling to declar variable without giving
- > a care of what its usage will be. You programing practice is VERY unwise...
-
- Don't distract, this was not the point. Intentional misunderstandings
- prove nothing.
-
- > programing on asuption (polymorphism?)
-
- That I'd call "spelling on assumption". :)
-
- > If the header file was programmed correctly it would not use ANSI data
- > type directly....
-
- What are you talking about? <time.h> is provided as part of the
- compiler. The compiler is a beast that translates a valid C source
- code defining an algorithm for an abstract machine into actual machine
- code for an actual machine.
-
- The semantics of the abstract machine are that there are some simple
- types (short, int, long, unsigned short, unsigned int, unsigned long,
- char, signed char, unsigned char, float, double, long double). You can
- derive compound types from simple or compund types (structs, unions,
- arrays, pointers). Additionally there are function pointers.
-
- Then there are objects of these types and operations on these objects.
- Certain guarantees about the properties of types and operations are
- made.
-
- Then there is clock_t (and similar beasts like size_t, prtdiff_t).
- clock_t is a typedef for one out of a set of simple types, but it is
- not said which one. Again, there are objects of type clock_t and
- operations defined for them with specific semantics.
-
- The idea behind clock_t is that it is a data type suitable for storage
- of the system's clock's value and certain operations on it. These
- operations are defined in an abstract way, independant of a specific
- choice what simple type clock_t may actually be.
-
- The obvious advantage is that these conception of the abstract machine
- allows C source code to be portable to many different actual machines,
- no matter what strange encoding they use for clock_t.
-
- Dave called it "polymorphism". I call it "data encapsulation". Anyway,
- it's a basic concept of decent programming, and not having understood
- it is no crime, but one probably shouldn't go around demonstrating it
- everywhere in the most embarrassing way. Eh?
-
- -- __
- __/// Arno Eigenwillig /\ <arno@yaps.rhein.de> \/ PGP key available.
- \XX/ V+49-2225-5870 /\ <Arnooo @ #amigager> \/ MIME 8bit welcome.
-