From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8b8748382fcfacc1 X-Google-Attributes: gid103376,public From: Ole-Hjalmar Kristensen Subject: Re: friend classes in ada95 (long) Date: 2000/04/25 Message-ID: #1/1 X-Deja-AN: 615524945 Sender: ohk@gong2.clustra.com References: X-Complaints-To: abuse@telia.no X-Trace: news.telia.no 956681088 195.204.160.194 (Tue, 25 Apr 2000 18:44:48 CEST) Organization: Telia Internet Public Access NNTP-Posting-Date: Tue, 25 Apr 2000 18:44:48 CEST Newsgroups: comp.lang.ada Date: 2000-04-25T00:00:00+00:00 List-Id: Brian Rogoff writes: > On 24 Apr 2000, Hyman Rosen wrote: > > Brian Rogoff writes: > > > It seems that I ruffled your feathers by using that word in the context of > > > your favorite language. Sorry. I actually liked the signature extension of > > > C++. I'd love to see such a feature grafted onto Ada. > > > > Sorry about that. My antennae sometimes get a little hyperextended in > > c.l.a. > > You'll probably have to develop a thicker skin, or tougher antennae, > because this is com.lang.ada after all. I'm similarly annoyed by the > gratuitous C++ slamming, even though I prefer Ada to C++ for most tasks, > but that's the nature of comp.lang.* > > > But as to signatures, I don't much care for them. It seems to > > me that they are there to take advantage of accidents in function > > naming, whereas interfaces are part of a design. > > Is that from actual use, or just reading and inference? I don't have any > real data myself, I just read about GNU C++ signatures. I did use Sather > for a while, which also had a powerful signature-like mechanism that > permitted the addition of signatures (types in Sather parlance) above > an existing class. This feature was mainly used to define type bounds in > generic classes. Since C++ doesn't have constrained parametric > polymorphism (yes, I know how to simulate it inelegantly in C++) this > isn't as important there. > > The real revolutionary aspect of standard C++ which I wish Ada would copy > is automatic generic/template instantiation. I think the modification to > Ada (read "An Ada like language") would be better off omitting the full > power of templates to do compile time calculations, and therefore omitting > "template metaprogramming", but would still enhance Ada's abilities in a > number of interesting ways. > > -- Brian > > Yes, I think it's sensible to restrict the power of templates, at least from an implementation view. I've seen so many C++ compilers that either fail to compile, or generate wrong code for complex templates. I still feel I cannot really trust C++ templates. -- E pluribus Unix