Path: utzoo!utgpu!water!watmath!watdragon!akwright From: akwright@watdragon.waterloo.edu (Andrew K. Wright) Newsgroups: comp.lang.c++ Subject: Re: Can we hide the private part of a class ? Message-ID: <8825@watdragon.waterloo.edu> Date: 2 Oct 88 14:47:10 GMT References: <1358@stratus> <1988Sep29.044111.16104@utzoo.uucp> <4193@polya.Stanford.EDU> Reply-To: akwright@watdragon.waterloo.edu (Andrew K. Wright) Organization: U. of Waterloo, Ontario Lines: 18 In article <4193@polya.Stanford.EDU> shap@polya.Stanford.EDU (Jonathan S. Shapiro) writes: >The flip side of this is that what you say about both languages is >wrong given a good librarian. The librarian could maintain the >component sizes, and at least for the client functions that would >eliminate unneeded dependency in both languages, subject to the >constraint that the private part be compiled first. A problem I see here is a stubborn adherence by many people to the conventional C-like or Ada-like view of separate compilation. Since the public part of a class can be generated automatically from the private part, why force the user to enter it at all? The compilation system (souped-up librarian) can determine it when compiling a program, and a tool can be provided to produce it for a reader. Eiffel is one existing OO language which operates this way. The research languages I have been working on for several years all operate this way. -- Andrew K. Wright watmath!akwright CS Dept., University of Waterloo.