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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,48fa8e3cfaec41af X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-23 08:12:15 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: worth the hassle? Date: 23 Jul 2002 11:05:34 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1027437263 27361 128.183.220.71 (23 Jul 2002 15:14:23 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 23 Jul 2002 15:14:23 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:27334 Date: 2002-07-23T15:14:23+00:00 List-Id: kcline17@hotmail.com (Kevin Cline) writes: > Stephen Leake wrote in message > news:... > > "chris.danx" writes: > > > > > > > > > > Is this a worth while tradeoff? I guess the question "how often > > > are limited > > > types used?" would serve better, as it would give a measure on > > > which to base > > > a decision. > > > > This was discussed extensively back in December 2001 during the Grace > > Lists requirements development. You could search on Google for that > > discussion. > > > > My own opinion is that supporting limited types is a requirement for > > any general-purpose container. > > > > This is probably one reason why Ada will never be as popular as C++; > > in C++, you don't have to make this kind of decision :). > > That's right -- in C++ there is no distinction between classes > with user-defined constructors and destructors and classes without > them. This is another factor that makes generic programming > easier in C++ than it is in Ada. It may be "easier" to write a template for a container class, but it is _not_ easier to use. If I happen to have a class that has a hidden copy operator, I'll get some obscure link time error when I try to instatiate a container that requires a copy operator. I'd much rather have that kind of error show up at compile time. > I think the decision in Ada to create a distinction between > 'limited' and ordinary types was a mistake. It gives programmers the > impression that 'limited types' are somehow exotic, but IMHO almost > all user-defined types should be limited types. Hmm. Just because the term "limited" appears in Ada, but no other language (that I know of), makes it "exotic"? Well, I guess that might be true for some newbies. But if it is presented correctly, it's just a reasonable way to define types. Since you think "almost all user-defined types should be limited types", perhaps you would prefer that the default type in Ada be "limited", and a non-limited type require an extra keyword, perhaps "assignable"? That would be interesting, but not upward compatible with Ada 83, since Standard.Integer etc don't have the keyword "assignable". -- -- Stephe