Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!pasteur!ucbvax!CORY.BERKELEY.EDU!dillon From: dillon@CORY.BERKELEY.EDU (Matt Dillon) Newsgroups: comp.sys.amiga Subject: Re: 'void *' (was Re: malloc() prob. on 3.4a) Message-ID: <8804200436.AA22240@cory.Berkeley.EDU> Date: 20 Apr 88 04:36:03 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 23 >Do you get my point? All C compilers correctly handle the conversion >of `char *' to pointer to anything; few have `void *'. Why should you >let your laziness get in the way of the portability of your code to >other Amiga C compilers? It depends on your definition of 'right'. If you want to limit yourself to obsolete versions of C, be my guest. In my experience, to write a truely portable C program (e.g. 32 bit int UNIX compiler to, say, an IBM-PC C compiler) takes twice as long and as half as readable no matter what you do. >Why not type a few extra casts just to be >sure? How much effort does it really take to do it right? It sounds like you aren't sure of your own code. I don't make those kind of mistakes. The type on the right is obvious since it is the same as the type on the left (in a pointer assignment); I don't need to be told twice, and when I read my source 10 years from now it will look as clear cut and clean and understandable as it did when I first wrote it. KEEP IN MIND that this whole argument deals solely with the declaration of functions that return different pointer types at different times. -Matt