Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!rutgers!att!lzaz!bds From: bds@lzaz.ATT.COM (B.SZABLAK) Newsgroups: comp.os.minix Subject: Re: Bug in fs/device.c, ioctl.c, tty.c Summary: MINIX programming philosophy/style Message-ID: <499@lzaz.ATT.COM> Date: 28 Mar 89 14:05:29 GMT References: <11714@louie.udel.EDU> Organization: AT&T ISL Lincroft NJ USA Lines: 14 In article <11714@louie.udel.EDU>, des@berlioz.nsc.com (Desmond Young) writes: > 2. The person who added the TTY_SPEED assignment defined it as m2.i3 > (3rd int of message type 2). THIS IS THE FIELD USED TO STORE THE PROC > NUMBER (OH SHIT)... My biggest complaint about the way MINIX is programmed is this overloading of message fields. It is confusing and error prone (at least when modifing things. I would have prefered a more "natural" approach: struct { int msgtype; union { struct type1 m1; ...; struct typeN mN; }; }; I can appreciate the problems with such an approach, but for an "instructional" OS, I believe this is a better way of doing things since it is clearer and less error prone (a good thing even for "real" OSs).