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,e55245590c829bef X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news1.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!news.glorb.com!news2.glorb.com!xmission!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: _Type vs no _Type Date: Fri, 05 Nov 2010 20:00:33 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <86wroy58ff.fsf@gareth.avalon.lan> <86pqup5xfy.fsf@gareth.avalon.lan> <86y69d3rec.fsf@gareth.avalon.lan> <82lj5c5ecm.fsf@stephe-leake.org> <82zktq4n9b.fsf_-_@stephe-leake.org> <87eib06yir.fsf@mid.deneb.enyo.de> <4cd3e34f$0$6978$9b4e6d93@newsspool4.arcor-online.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: pcls6.std.com 1289001634 4033 192.74.137.71 (6 Nov 2010 00:00:34 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sat, 6 Nov 2010 00:00:34 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:vFBUxQBpxIWVwKh82g91ZcpN/sQ= Xref: g2news2.google.com comp.lang.ada:16274 Date: 2010-11-05T20:00:33-04:00 List-Id: "J-P. Rosen" writes: > Le 05/11/2010 11:58, Georg Bauhaus a �crit : > >> Does AdaControl have a rule for too similar names? >> > N**2 comparisons, with pattern matching? Sorry, no ;-) I don't see any N**2. Yeah, that would be bad. Squeeze out "_". Convert to lower case (or upper case?). Convert similar-looking characters to the same. (E.g. "0"(zero) --> "O"(Oh).) Then compare. It might be complicated to figure out what characters are "similar-looking", and to figure out which Unicode case-mapping to use, but it seems like an O(N) lookup in a hash table should then suffice. - Bob