Path: news.cs.au.dk!not-for-mail From: nospam2159@cs.au.dk (Peter von der Ahé) Newsgroups: comp.lang.beta Subject: Re: Beginner at work: two dimensional value-based array generic Date: 08 Jan 1999 18:59:18 +0100 Organization: University of Aarhus, Department of Computer Science (DAIMI) Lines: 40 Message-ID: References: NNTP-Posting-Host: ufleku.cs.au.dk Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: xinwen.cs.au.dk 915818406 13721 255.255.255.255 (8 Jan 1999 18:00:06 GMT) X-Complaints-To: news@cs.au.dk NNTP-Posting-Date: 8 Jan 1999 18:00:06 GMT X-Attribution: Ahe User-Agent: Gnus/5.070069 (Pterodactyl Gnus v0.69) Emacs/20.3 Xref: news.cs.au.dk comp.lang.beta:11777 >>>>> "JL" == Jean-Louis Leroy writes: JL> Hello Peter, JL> thanks for the information. Obviously my approach was too JL> severely inspired by the C++ template mechanism The C++ template mechanism is very interesting, after hearing a talk by Bjarne Stroustrup, where he introduced templates, I am now convinced that I should try out C++ soon. JL> I have the impression, however, that it is not possible to create JL> a container generic and instantiate it on a simple type and get JL> the same efficiency WRT space and speed as from an equivalent JL> handwritten container. After changing my Array code along your JL> indications, it didn't work on integer anymore, I had to use JL> integerObject instead (I was not surprised). In C++-speak, it's JL> as if I can have a handwritten vector_int or a vector, but JL> not a vector. Am I right? [...] I think you are. But consider that BETA is a small language with only a few keywords. C++ is far more complex than BETA, when you consider the amount of language constructs. BETA is a beautiful language from a theoretically viewpoint -- C++ is not :-) I think that many of the features in C++ can be viewed as performance hacks -- this is not a bad thing -- but the design goals for BETA and C++ are very different. Kind Regards Peter -- · Peter von der Ahé · Systems programmer · · Office phone: +45 89 42 31 41 · Office: 540.030 · · ·