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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ac4955b8006bd13c X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Received: by 10.68.238.65 with SMTP id vi1mr9560035pbc.7.1338788585460; Sun, 03 Jun 2012 22:43:05 -0700 (PDT) Path: l9ni17702pbj.0!nntp.google.com!news1.google.com!news.glorb.com!feeder.erje.net!zen.net.uk!dedekind.zen.co.uk!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Q: type ... is new String Date: Mon, 04 Jun 2012 07:43:04 +0200 Organization: Ada @ Home Message-ID: References: NNTP-Posting-Host: Dd9R6puHiTvzf2FllTJGfQ.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.00 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2012-06-04T07:43:04+02:00 List-Id: Le Wed, 30 May 2012 18:33:45 +0200, a =C3=A9crit: > Any comments on the effectiveness of using multiple types for differen= t > categories of strings, rather than "String" all the time? > I have a TV program database with a base directory, containing a fol= der > 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, e= g > c:\TV\I Love Lucy\1975\The New Neighbor\video.mpg > Instead of wordy, and error prone, calls on Ada.Directories.Compose, o= r > 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; > ... May be a single base Path_Type could be enough, and all others could be = = subtype of this base type. -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [1] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [1] [1]: Epigrams on Programming =E2=80=94 Alan J. =E2=80=94 P. Yale Univers= ity