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=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!feeder1.cambriumusenet.nl!82.197.223.108.MISMATCH!feeder2.cambriumusenet.nl!feed.tweaknews.nl!212.27.60.9.MISMATCH!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Thu, 10 Apr 2014 10:42:17 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Your wish list for Ada 202X References: <7f1c01c5-3563-4b94-9831-152dbbf2ecdc@googlegroups.com> <8bhozh836pyt$.1qctlysud0s2q$.dlg@40tude.net> <1cdsyxjzsfgzm.1synpaujysv21$.dlg@40tude.net> <1aa804jg9qq4o$.wdiq33yo621l.dlg@40tude.net> <1w6eh0aiksmdh$.1h16p7y0b8c6h.dlg@40tude.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <53465969$0$6708$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 10 Apr 2014 10:42:17 CEST NNTP-Posting-Host: 81b62772.newsspool3.arcor-online.net X-Trace: DXC=H`Xa@EEgBcOlU`@c^jLCbJMcF=Q^Z^V3H4Fo<]lROoRA8kFejVHD_1dGI:3mC X-Complaints-To: usenet-abuse@arcor.de X-Original-Bytes: 2970 Xref: number.nntp.dca.giganews.com comp.lang.ada:185649 Date: 2014-04-10T10:42:17+02:00 List-Id: On 10/04/14 05:28, Randy Brukardt wrote: >>> But it's all we have. Sure, you can map a tag (this requires a loop, >>> >>either >>> >>a brute force lookup or some fancier but much more code-intensive >>> >>version), >>> >>but that's going to make dispatching far more expensive. You can't do >>> >>this >>> >>mapping at compile-time because what mapping you need depends on the >>> >>interfaces in use. >> > >> >I can build a perfect hash at bind/link time when all involved tags become >> >known. > "can" means "possible", not "practical". That might be possible if the > number of tags is small, but that's not the case in a lot of OO systems. (A > Claw program starts with somewhere around 80.) Finding a perfect hash gets > very time consuming if the number of items is large - I don't think people > will be very happy with binding that takes 12 hours. Are you certain about the cost of computing perfect hashes? I tried gperf(1) on a hundred words and ran it a thousand times in a loop. The loop has taken just a few seconds: a=1000 while test $a -gt 0 do head -100 /usr/share/dict/words |gperf > /dev/null a=$(($a - 1)) done