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.7 required=5.0 tests=BAYES_00,INVALID_DATE, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,ef0074ec236ba6e3 X-Google-Attributes: gid109fba,public X-Google-Thread: 108717,ef0074ec236ba6e3 X-Google-Attributes: gid108717,public X-Google-Thread: 1108a1,ef0074ec236ba6e3 X-Google-Attributes: gid1108a1,public X-Google-Thread: 103376,b19fa62fdce575f9 X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,ef0074ec236ba6e3 X-Google-Attributes: gid1014db,public X-Google-ArrivalTime: 1994-12-05 07:48:20 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!pipex!uunet!newsgate.watson.ibm.com!watnews.watson.ibm.com!ncohen From: ncohen@watson.ibm.com (Norman H. Cohen) Newsgroups: comp.lang.ada,comp.lang.c,comp.programming,comp.lang.c++,comp.object Subject: Re: Why don't large companies use Ada? Date: 5 Dec 1994 15:23:54 GMT Organization: IBM T.J. Watson Research Center Distribution: world Message-ID: <3bvbaa$1lla@watnews1.watson.ibm.com> References: <3aa7jo$7j@Starbase.NeoSoft.COM> <3b5ajt$n86@news-2.csn.net> <3b5h8q$de0@felix.seas.gwu.edu> <3bd06n$kbt@felix.seas.gwu.edu> <3bldlu$84r@gnat.cs.nyu.edu> Reply-To: ncohen@watson.ibm.com NNTP-Posting-Host: rios8.watson.ibm.com Xref: bga.com comp.lang.ada:8280 comp.lang.c:33397 comp.programming:5619 comp.lang.c++:39622 comp.object:9434 Date: 1994-12-05T15:23:54+00:00 List-Id: In article <3bldlu$84r@gnat.cs.nyu.edu>, dewar@cs.nyu.edu (Robert Dewar) writes: |> IN practice, I find the strong type protection of different integer types |> to be of minimal value, strong typing is most important at a higher level |> than that, but that's a matter of personal taste. For computationally intensive uses of numeric types (the subject of Robert's posting) I certainly agree. However, I have found a compelling use of strong typing to be the declaration of distinct array-index types: type Dictionary_Index_Type is range Min_Index .. Max_Index; type Dictionary_Type is array (Dictionary_Index_Type) of Dictionary_Entry_Type; type Node_Name_Type is range Min_Node .. Max_Node; type Graph_Type is array (Node_Name_Type) of Node_Info_Type; This kind of distinction rarely forces one into a type conversion and it avoids a kind of error that really does occur in programs where the same type is used to index different kinds of arrays. Most importantly, as types like Dictionary_Index_Type and Node_Name_Type propagate into subprogram interfaces, they provide a valuable aid to program understanding, making it crystal clear what kind of information is being passed to and from subprograms. -- Norman H. Cohen ncohen@watson.ibm.com