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.0 required=5.0 tests=BAYES_40 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ac4955b8006bd13c,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.238.65 with SMTP id vi1mr4321357pbc.7.1338395629782; Wed, 30 May 2012 09:33:49 -0700 (PDT) MIME-Version: 1.0 Path: pr3ni66540pbb.0!nntp.google.com!news1.google.com!feed-C.news.volia.net!volia.net!news2.volia.net!feed-A.news.volia.net!news.musoftware.de!wum.musoftware.de!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Q: type ... is new String Date: Wed, 30 May 2012 16:33:45 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: NNTP-Posting-Host: Lf0Nl3CcQzx+ocHx9cmuGg.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Tom's custom newsreader Date: 2012-05-30T16:33:45+00:00 List-Id: Any comments on the effectiveness of using multiple types for different categories of strings, rather than "String" all the time? I have a TV program database with a base directory, containing a folder for each show, which in turn has a folder for each season, which then has a folder for each episode, which then contains the actual video, eg c:\TV\I Love Lucy\1975\The New Neighbor\video.mpg Instead of wordy, and error prone, calls on Ada.Directories.Compose, or Episode & '\' & Video_File Would it be useful to have type Show_Paths is new String; type Season_Paths is new String; type Episode_Paths is new String; ... function "+"(Show : Show_Paths; Season : String) return Season_Paths; function "+"(Show_Season : Season_Paths; Episode : String) return Episode_Paths; etc so one could write This_Show : Show_Paths := ... First_Episode_Name : String := ... Episode_Path : Episode_Paths := This_Show + "1975" + First_Episode_Name; but the compiler would object to Episode_Path : Episode_Paths := This_Show + First_Episode_Name;