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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Parameterless generic instance in place of opaque type instance Date: Sun, 28 Jul 2013 10:24:32 +0200 Organization: Ada @ Home Message-ID: References: NNTP-Posting-Host: ds8m8HfAx594C0h4s/JFyA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.16 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 X-Original-Bytes: 1914 Xref: number.nntp.dca.giganews.com comp.lang.ada:182733 Date: 2013-07-28T10:24:32+02:00 List-Id: Le Sun, 28 Jul 2013 09:30:18 +0200, J-P. Rosen a =C3=A9= crit: > Le 28/07/2013 07:49, Yannick Duch=C3=AAne (Hibou57) a =C3=A9crit : >> For these types, a parameterless generic instance may be enough. I ho= pe >> most compilers are clever enough to not duplicate machine code for ea= ch >> of these instances, and just duplicate their data (valid or invalid >> assumption?). > This is a basic design pattern of HOOD (and the main one in early > versions). Since HOOD is based on abstract state machines, it > represented each machine with a package, and the package was made > generic if you wanted several identical ASM. Thanks for the notice Jean=E2=80=91Pierre! (also reminds me I should hav= e a deep = and serious look a future day, at that PDF I have about HOOD) -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [1] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [1] [1]: Epigrams on Programming =E2=80=94 Alan J. =E2=80=94 P. Yale Univers= ity