Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!pasteur!ucbvax!ucsd!orion.cf.uci.edu!elroy!cit-vax!kevin From: kevin@cit-vax.Caltech.Edu (Kevin S. Van Horn) Newsgroups: comp.lang.misc Subject: Re: What is B&D? (Re: Bondage and Discipline Languages) Message-ID: <9175@cit-vax.Caltech.Edu> Date: 20 Jan 89 18:20:09 GMT References: <8784@megaron.arizona.edu> Reply-To: kevin@cit-vax.UUCP (Kevin S. Van Horn) Organization: California Institute of Technology Lines: 22 In article <8784@megaron.arizona.edu> gudeman@arizona.edu (David Gudeman) writes: [with reference to treating a variable as an integer at one point and as a pointer at another point] >The question is _how_ you do it. You have to use variant records in >Pascal and Modula-2 and unchecked_conversion in Ada. This is because >the designers of Pascal, Modula-2, and Ada thought that sort of thing >was dangerous, and wanted to make it inconvenient to do. The >inconvenience was supposed to discourage such practices, and the extra >syntax was supposed to make sure it didn't happen by accident. Give me a break! What's so horribly difficult and inconvenient about writing x.f1 when you want to use x as a variable of type t1, and x.f2 when you want to use it as a variable of type t2? And I think you're way off base when you say that the designers of Pascal et al. introduced variant records to make such type conversions difficult; they merely wanted to make them *explicit*. As to your statement that, "the extra syntax was supposed to make sure it didn't happen by accident," well I should hope so! By definition, if you used a pointer as an integer "by accident" then what you wrote was not what you really intended, and any rational person would want to know this. Kevin S. Van Horn