Path: news.cs.au.dk!not-for-mail From: Daniel Bonniot Newsgroups: comp.lang.beta Subject: Re: Speeding up BETA Date: 4 May 1999 09:13:34 -0000 Organization: University of Aarhus, Department of Computer Science (DAIMI) Lines: 17 Approved: mailtonews@cs.au.dk Distribution: world Message-ID: <19990504091334.10135.qmail@noatun.mjolner.dk> Reply-To: Daniel Bonniot NNTP-Posting-Host: daimi.cs.au.dk X-Trace: xinwen.cs.au.dk 925809232 2162491 255.255.255.255 (4 May 1999 09:13:52 GMT) X-Complaints-To: news@cs.au.dk NNTP-Posting-Date: 4 May 1999 09:13:52 GMT Xref: news.cs.au.dk comp.lang.beta:11918 > > 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. > OK but this could be done by explicitly initializing local attributes. Isn't there a harder problem for concurent threads ? If two threads called the single object, the two executions would share local attributes, which could lead to errors. Daniel Bonniot