From owner-freebsd-current Wed Aug 5 23:06:45 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA05915 for freebsd-current-outgoing; Wed, 5 Aug 1998 23:06:45 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from smtp01.primenet.com (smtp01.primenet.com [206.165.6.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA05907 for ; Wed, 5 Aug 1998 23:06:42 -0700 (PDT) (envelope-from tlambert@usr09.primenet.com) Received: (from daemon@localhost) by smtp01.primenet.com (8.8.8/8.8.8) id XAA21869; Wed, 5 Aug 1998 23:06:27 -0700 (MST) Received: from usr09.primenet.com(206.165.6.209) via SMTP by smtp01.primenet.com, id smtpd021836; Wed Aug 5 23:06:22 1998 Received: (from tlambert@localhost) by usr09.primenet.com (8.8.5/8.8.5) id XAA22855; Wed, 5 Aug 1998 23:06:17 -0700 (MST) From: Terry Lambert Message-Id: <199808060606.XAA22855@usr09.primenet.com> Subject: Re: Heads up on LFS To: reilly@zeta.org.au (Andrew Reilly) Date: Thu, 6 Aug 1998 06:06:17 +0000 (GMT) Cc: tlambert@primenet.com, tom@uniserve.com, current@FreeBSD.ORG In-Reply-To: <19980806112955.A4299@reilly.home> from "Andrew Reilly" at Aug 6, 98 11:29:55 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > It's written in > > Modula 3 (of all things) and incorporates nullfs and lfs from FreeBSD, > > as well as CAM. > > I don't think that "of all things" is particularly fair: their > reasoning for the entire viability of the project is that they rely > on the strict typing and garbage collection of Modula-3 to prevent > user-written kernel extensions from breaking other kernel bits. To each his own; the need for a garbage collector for things that the language should know were out of scope and therefore not need to garbage collect is an agrument against such languages, in my book. > You couldn't really do it in C or even C++. The same logic is used > by the Sun JavaOS folks (Java being Modula-3 in C clothes, that's > hardly surprising.) The argument is interesting, but a bit too > restrictive to be useful in a general purpose sense, I think. The same argument about no explicit object destruction is a good anti-JAVA argument, as well. As far as C++: I've implemented a large portion of the java and javax classes in C++, including the Exception and Throwable classes, as part of a project unrelated to JAVA (I just figured that I might as well not reinvent a model Sun spent millions of dollars inventing, and the model was based on these classes). So you can indeed write JAVA in C++; you just need to do the right thing as regards deletion when something goes out of scope. The Vector, Enumerator, and Iterator classes are particularly tricky... > Now if you were prepared to rely on hardware memory /protection/ > without using the hardware memory /mapping/, you could probably > do the same thing in C or C++ (or assembly language). I believe > that this has been tried in some of the Acorn ARM based OS's > (RiscOS and the Newton OS.) It's possible in C++, if you are willing to explicitly destruct objects when you know they are going out of scope but the compiler doesn't, especially if you are using them as pointers instead of references. JAVA has a nasty tendency to leak like a sieve until the GC hits a steady state. As does Modula 3. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message