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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,bdcca6db8294fb00 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news3.google.com!feeder.news-service.com!feeder.news-service.com!newsfeed101.telia.com!starscream.dk.telia.net!news.tele.dk!feed118.news.tele.dk!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Date: Mon, 20 Dec 2010 09:25:58 +0100 From: =?ISO-8859-1?Q?Thomas_L=F8cke?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101210 Thunderbird/3.1.7 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Introducing memcache-ada, a memcached client in Ada References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: <4d0f1316$0$23759$14726298@news.sunsite.dk> Organization: SunSITE.dk - Supporting Open source NNTP-Posting-Host: 83.91.213.86 X-Trace: news.sunsite.dk DXC=:aHU]72;29WPF49IdUYT?QYSB=nbEKnk[0>Me?MlWgBQ1GQX8;5?CnWRED9SjB8:6YQo^8G8>And]RCZPNnZaBfV?DnJl7^Pb6_ X-Complaints-To: staff@sunsite.dk Xref: g2news2.google.com comp.lang.ada:17029 Date: 2010-12-20T09:25:58+01:00 List-Id: On 2010-12-20 01:43, R Tyler Croy wrote: > > My first "real" project in Ada has been a memcached client written in Ada: > > > Right now it has basic functionality of being able to "get" a key, "set" a > value, "delete" a value and increment/decrement values. > > There's still a few functions unimplemented, but I think it's in a usable state > right now. > > I look forward to any comments or suggestions as to the code > quality/structure. Hey, It looks pretty good to me. I do though have four suggestions: 1. Declare all the string literals ("STORED", "NOT_FOUND" and such) as constants in the specification. 2. Get rid of the ASCII.x and use Ada.Characters.Latin_1 instead. The ASCII package is considered obsolescent. Oh, and perhaps declare the ASCII.CR & ASCII.LF combo as a CRLF constant also? 3. Take a look at the various search subprograms in Ada.Strings.Fixed and Ada.Strings.Unbounded. Some of them might be able to replace a loop here or there. 4. Place your subprograms in alphabetical order. Actually, that might just be me, but it hurts my eyes seeing Append_CRLF down there at the bottom. :D I can't comment on the actual functionality of the program, as I've never used memcached, but at a quick glance everything looks very neat and tidy. As far as I can tell from the repo, you've only been at this since early November. If this is your first ever Ada project, then I'd say you're a pretty damn fast learner! I'm only a little jealous. -- Regards, Thomas L�cke Email: tl at ada-dk.org Web: http:ada-dk.org IRC nick: ThomasLocke