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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,38fc011071df5a27 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-17 14:10:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!msunews!not-for-mail From: "Chad R. Meiners" Newsgroups: comp.lang.ada Subject: Re: Ideas for Ada 200X "left hand side" repeater. Date: Tue, 17 Jun 2003 17:03:53 -0400 Organization: Michigan State University Message-ID: References: <3EE7CC70.E1FD3A67@adaworks.com> <3EECA772.4B662024@adaworks.com> NNTP-Posting-Host: arctic.cse.msu.edu X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Xref: archiver1.google.com comp.lang.ada:39367 Date: 2003-06-17T17:03:53-04:00 List-Id: "Bill Findlay" wrote in message news:BB14D345.35C8%yaldnifw@blueyonder.co.uk... >> > > What about using 'is' to express identity? e.g.: > > > > Pixel is Screen.Buffer(i) in Pixel := Pixel + 1; I think I like this. > > It's not exactly concise, though. Nor is any 'implicit renaming' solution. Perhaps simplified is a better description because it allows the written format to enhance readability. Pixel is Screen.Buffer(i) in Pixel := Pixel + 1; It also separates the dual concerns of naming complex expression and having clear statements while keeping the names in sight of each other. Perhaps the above sample is too simple how about Pixel is Screen.Buffer(i) in Pixel := To_Red(Get_Green(Pixel)) + To_Green(Get_Blue(Pixel)) + To_Blue(Get_Red(Pixel)); versus declare Pixel : Buffer_Element renames Screen.Buffer(i); Red : constant Scale := Get_Red(Pixel); Green : constant Scale := Get_Green(Pixel); Blue : constant Scale := Get_Blue(Pixel); begin Pixel := To_Red(Green) + To_Green(Blue) + To_Blue(Red); end; or Screen.Buffer(i) := To_Red(Get_Green(Screen.Buffer(i))) + To_Green(Get_Blue(Screen.Buffer(i))) + To_Blue(Get_Red(Screen.Buffer(i))); > However, it does generalize, to, e.g.: > > V is A_Variable in Perform_Operations_On(V); This too I like.