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-Thread: a07f3367d7,9e7db243dfa070d7 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Do people who use Ada also use ocaml or F#? References: <87k4kz3mda.fsf@mid.deneb.enyo.de> <5jjgrklivesk$.z0is5qe7mgbt.dlg@40tude.net> Date: Sat, 06 Nov 2010 13:22:00 -0400 Message-ID: <82mxpmz7t3.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (windows-nt) Cancel-Lock: sha1:tEk8Qen6c6LSPJEEgHuCV70ykTc= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: c6be14cd58c38e9cdf0b020208 Xref: g2news1.google.com comp.lang.ada:15343 Date: 2010-11-06T13:22:00-04:00 List-Id: Robert A Duff writes: > "Dmitry A. Kazakov" writes: > >> How do you execute a generic body? Testable are generic instances. > > You can't test a generic without instantiating it. > > You can't test a procedure without calling it. > > You can't test an abstract type without declaring > a concrete type, and some objects of that type. > > What am I missing? To truly test a generic, you need to test with all possible instantiations. Or at least with a representative subset. If the generic parameters are well structured, it may be possible to show that a few instances are sufficient. That's much more effort than testing a single concrete procedure. It may be worth it, of course; I often use generics precisely to reduce testing burden. -- -- Stephe