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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9128d7fc47b36d3a,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-31 13:46:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.gtei.net!newscon02.news.prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr17.news.prodigy.com.POSTED!53ab2750!not-for-mail Message-ID: <3CA7846E.4888A5F6@flash.net> From: Gary Scott Reply-To: scottg@flash.net Organization: Home X-Mailer: Mozilla 4.79 [en]C-DIAL (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: OT: F2K Type Extensions and "SELECT TYPE" Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 64.48.222.208 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr17.news.prodigy.com 1017611153 ST000 64.48.222.208 (Sun, 31 Mar 2002 16:45:53 EST) NNTP-Posting-Date: Sun, 31 Mar 2002 16:45:53 EST X-UserInfo1: FKPO@MC@OXZUPAX_Z[BDMUDATRXVPBQLGPQRZQMIWIWTEPIB_NVUAH_[BL[\IRKIANGGJBFNJF_DOLSCENSY^U@FRFUEXR@KFXYDBPWBCDQJA@X_DCBHXR[C@\EOKCJLED_SZ@RMWYXYWE_P@\\GOIW^@SYFFSWHFIXMADO@^[ADPRPETLBJ]RDGENSKQQZN Date: Sun, 31 Mar 2002 21:45:53 GMT Xref: archiver1.google.com comp.lang.ada:21929 Date: 2002-03-31T21:45:53+00:00 List-Id: Hi, Sorry this is off topic, I just wanted to get another perspective on this. Fortran 2k is implementing extensible derived types and a "select type" statement. As part of the construct, it uses TYPE IN and TYPE IS as in: type, extensible :: point real :: x, y end type point type, extends(point) :: point_3d real :: z end type point_3d type, extends(point) :: color_point integer :: color end type color_point type(point), target :: p type(point_3d), target :: p3 type(color_point), target :: c class(point), pointer :: p_or_c p_or_c => c select type (a => p_or_c) type in (point) ... type is (point_3d) ... end select This is fairly straightforward except that I think the names TYPE IN and TYPE IS can be improved to convey the selection criteria/concept better to non-OO type engineers (possibly "TYPE IN_SET" or "TYPE IS_IN_SET" and "TYPE SAME". Any recommendations? Happy with it the way it is? As long as we're creating a new language, may as well get it right (meaning adequately conveying the meaning to those language users that are definitely going to be overwhelmingly "procedural" in their thought process and will want to learn to use OO over time). Thanks -- Gary Scott mailto:scottg@flash.net