Path: news.cs.au.dk!news.net.uni-c.dk!howland.erols.net!netnews.com!newspeer.monmouth.com!nntp2.dejanews.com!nnrp1.dejanews.com!not-for-mail From: Andrew Klaassen Newsgroups: comp.lang.beta Subject: Re: Speeding up BETA Date: Tue, 04 May 1999 23:10:25 GMT Organization: Deja News - The Leader in Internet Discussion Lines: 62 Message-ID: <7gnuou$4qg$1@nnrp1.dejanews.com> References: <7glmo2$6di$1@nnrp1.dejanews.com> NNTP-Posting-Host: 206.75.182.189 X-Article-Creation-Date: Tue May 04 23:10:25 1999 GMT X-Http-User-Agent: Mozilla/3.04 (X11; I; Linux 2.2.4 i486) X-Http-Proxy: 1.0 x3.dejanews.com:80 (Squid/1.1.22) for client 206.75.182.189 Xref: news.cs.au.dk comp.lang.beta:11921 In article , Morten Grouleff wrote: > Andrew Klaassen writes: ---snip--- > > > > I tried a few other built-in BETA patterns; ---snip--- > > Actually, they're not built-in in the language or the compiler, they are > implemented in BETA in betaenv.bet and its BODY-fragments. > ....mmm...yes. "Forgive us our trespasses against precise terminology... " ---snip--- > > > Are there good reasons _not_ to use a single object > > instantiated from a built-in pattern, like the above, in > > "real" programs? > > For patterns like putline, no. But the pattern must be able to handle > it: Some patterns depend on the fact that their local attributes are > initialized (to zero, empty string, false depending on the type). This > is done at allocation, so calling it twice might make such patterns > behave badly. Of course. If I would have thought about this a wee smidge before firing off my question, I would have remembered that bit about local attributes being initialized to zero/false/ etc. Looking through another comp.lang.beta thread ("Inconsistency in the Mjoelner implemenation?"), I noticed that this characteristic of BETA (or just of Mjolner BETA?) also makes it difficult for the compiler to attempt the same kind of optimization as I'm asking about here. Is this question of "automatically initializing local variables makes it more difficult for a compiler to decide whether 'inserted objects' could be used to optimize code" one that's debated when languages are designed? Is it just an OO problem? A BETA problem? (Sorry if the question violates the boundaries of this newsgroup...or if the most appropriate response to it would be, "There are schools that teach this sort of thing, you know..." ) > > Regards, > -- > ** Morten Grouleff: ** > ** Earthworm Jim PC: ** > ** Mjølner Informatics: ** > Thanks! Andrew Klaassen -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own