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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b5ab7c96b188b59e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-14 06:58:57 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!tar-atanamir.cbb-automation.DE!not-for-mail From: Dmitry A. Kazakov Newsgroups: comp.lang.ada Subject: Re: The "()" operator revisited. Date: Wed, 14 Jan 2004 16:05:40 +0100 Message-ID: <3cga00pecuc18o3irdnmoin4e7ekh87n76@4ax.com> References: NNTP-Posting-Host: tar-atanamir.cbb-automation.de (212.79.194.116) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 1074092335 13980309 212.79.194.116 ([77047]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:4399 Date: 2004-01-14T16:05:40+01:00 List-Id: On Wed, 14 Jan 2004 12:55:36 +0000 (UTC), Georg Bauhaus wrote: >Dmitry A. Kazakov wrote: >: >: Wrong, the Future Language will need no templates. (:-)) > >Thus > > type Set; > function Set.contains(e: Any) -> Boolean; > ... > > type AppleSet; > function AppleSet.contains(e: Apple) -> Boolean; Is AppleSet related to Set? I do not like the C++ way, of telling that they both have a function named "contains". > ... > > type OrangeSet; > function AppleSet.contains(e: Orange) -> Boolean; > ... > >Or which way? Templates are for generic programming. I would like to do generic programming in terms class-wide subroutines and discriminated types. Then in place of template specialization, I would put constraints on discriminants. I would also treat X'Tag as a discriminant of S'Class. Though it would be interesting to consider making types the first class objects, I think that we could replace them with their tags, instead. -- Regards, Dmitry A. Kazakov www.dmitry-kazakov.de