Path: utzoo!attcan!uunet!husc6!bloom-beacon!EXPO.LCS.MIT.EDU!jim From: jim@EXPO.LCS.MIT.EDU (Jim Fulton) Newsgroups: comp.windows.x Subject: Re: Xtk "unsigned int" typedefs considered harmful Message-ID: <8809131658.AA03210@EXPO.LCS.MIT.EDU> Date: 13 Sep 88 16:58:22 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: X Consortium, MIT Laboratory for Computer Science Lines: 25 > The point is that having Dimension, et.al., typedef'd as unsigned ints > has no redeeming virtue whatsoever Yes they do. They are unsigned because things that are Dimensions are cardinal in nature. And, they are frequently passed to routines that expect unsigned values. If you are doing something that generates "negative" dimensions, you'll need to use a different data type (note that Positions are signed). > Well, there is another possible rationale: "Let's see how much havoc we > can wreak by typedef'ing something contrary to its expected use..." :-) Its expected use is to be an unsigned quantity. > Naturally, I prefer to think it was just a small oversight which can be set > straight with just a few seconds editing before R3 is shipped out. It wasn't an oversight. In any case, it's up to Ralph. Jim Fulton MIT X Consortium