Path: news.daimi.aau.dk!olevi From: olevi@daimi.aau.dk (Ole Villumsen) Newsgroups: comp.lang.beta Subject: Re: Value patterns in BETA? Date: 13 Feb 1995 15:08:11 GMT Organization: DAIMI, Computer Science Dept. at Aarhus University Lines: 47 Message-ID: <3hnskr$13m@belfort.daimi.aau.dk> References: <3gsak5$j5b@engnews2.Eng.Sun.COM> NNTP-Posting-Host: angers.daimi.aau.dk Brian Rogoff writes: >Let me rephrase my question. In the case that I have declared a "Complex" >pattern as a static object, do I pay any penalty at all, i.e., some sort >of type tag in each Complex object? If so, is there any way for me to >avoid paying this penalty. What I'd really like to do is have a Complex >object which, if it consisted of 8 byte reals, would only take up 16 bytes >of space. I think that in Ada 95 the "tagged" keyword conveys the idea of >what I am looking for; the ability to create untagged Complex types which >may be "generic" but cannot be inherited from. >I asked about this some time ago, and I was told that there is indeed a tag >in Mjolner BETA. Is this the case? Yes: there is a small space overhead for every object in a BETA program. There is no *time* penalty, as far as I know. >In article <3gsak5$j5b@engnews2.Eng.Sun.COM> olm@Eng.Sun.COM (Ole Lehrmann Madsen) writes: > p1 -> p2.add -> p3 > but if you mean operator overloading like > p1 + p2 -> p3 I'd prefer (p1,p2) -> add -> p3 , which is possible in BETA. >That wasn't part of my original question, but your prescience is amazing >because I was wondering about that too! I agree that real overloading may >be kind of heavy for BETA, but how about some kind of Eiffel 3 style >ability to declare new binary operators without ad-hoc polymorphism? I Not knowing Eiffel 3, I can't answer your question here. >don't see how this would be that complicated, and community standards >could be used to adopt "reasonable" operators for common applications. I hope >such a facility would not be that heavily used outside of mathematical >applications. In any case, this is *far* less important to me than the >ability to make highly efficient numeric classes (and hence efficient >matrix classes, etc...) Yours, Ole -- Ole Villumsen, Computer Science Department, Aarhus University, Denmark - no, not *that* Ole :-) "When God created time, he created enough of it."