Path: utzoo!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!mailrus!iuvax!maytag!watstat!dmurdoch From: dmurdoch@watstat.uwaterloo.ca (Duncan Murdoch) Newsgroups: comp.sys.ibm.pc.programmer Subject: Re: No Aliasing Compile Option Keywords: Microsoft 6.0 C update woes Message-ID: <1990May29.134523.6261@maytag.waterloo.edu> Date: 29 May 90 13:45:23 GMT Article-I.D.: maytag.1990May29.134523.6261 References: <4886@daffy.cs.wisc.edu> <26547195.F69@tct.uucp> <134@qmsseq.imagen.com> <3866@rtifs1.UUCP> Sender: daemon@maytag.waterloo.edu (Admin) Organization: University of Waterloo Lines: 21 In article <3866@rtifs1.UUCP> bcw@rti.rti.org (Bruce Wright) writes: >In article <134@qmsseq.imagen.com>, pipkins@qmsseq.imagen.com (Jeff Pipkins) writes: >> 2. It is not "wrong" to use aliasing, either morally or legally, and it is >> not generally considered bad practice. Since I used the word "morally", >> this is obviously my opinion. > >I don't know where you've been, but where _I've_ been it _has_ been >considered bad practice to use aliasing. Not bad _morally_ or >_legally_ (how silly) but bad from a program maintenance point of >view: it's difficult for someone other than the person who wrote >the code to understand, correct, and/or modify the code. Sometimes >it can even be difficult for the person who wrote it (!). Is it considered to be aliasing to have two pointers pointing at the same thing? This seems to be a very useful and common practice; think about having an array sorted in two different ways: you usually wouldn't want two copies of the data (especially if you want to modify the entries!), you'd probably just want two arrays of pointers into it. Does this sort of practice fail when aliasing isn't allowed? Duncan Murdoch