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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3bf50ede73cff892 X-Google-Attributes: gid103376,public From: mfb@mbunix.mitre.org (Michael F Brenner) Subject: Re: Operators Questions Date: 1996/10/31 Message-ID: <55b38m$fk@top.mitre.org>#1/1 X-Deja-AN: 193496698 references: <3275D478.5952@eurocontrol.fr> organization: The MITRE Corporation, Bedford Mass. newsgroups: comp.lang.ada Date: 1996-10-31T00:00:00+00:00 List-Id: M. Heaney said: > Put this on my wish list for the next revision of the language: the > ability to overload the membership operator "in". This would be a very good syntactic idea, because it not only opens up the example Matt gave (if member in Set), but also an obvious loop iterator (for member in Set). The first language to do this was Jack Schwartz's SETL language, which is still one of the fastest ways to prototype complex data structures. The most notable difference between the current version of SETL and Ada-95 is that, because of the extremely high generality of IN and FORALL, a typical SETL algorithm runs two orders of magnitude slower than an Ada-95 program. Typically, there are two levels of interpretation, an algorithmic interpretor and a data structure interpretor, each of which add up an order of magnitude of execution time to a program. SETL does not declare the type of its objects, so an object could be an integer or a recursive structure of sets within sets within sets. The ideal would be to have both a typeless prototype language and a strongly typed implementation language. Because the typeless language would definitely use the more mathematical notation of IN and FOR, it would be a very positive step for Ada-000X to permit strongly typed overloading of IN and FOR, so that both languages could use the identical algorithmic form.