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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ea8ea502d35ca2ce X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-09 05:11:19 PST Path: newsfeed.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!server3.netnews.ja.net!server4.netnews.ja.net!server2.netnews.ja.net!newshost.central.susx.ac.uk!news.bton.ac.uk!not-for-mail From: John English Newsgroups: comp.lang.ada Subject: Re: Beginner's Language? Date: Wed, 09 May 2001 12:31:17 +0100 Organization: University of Brighton Message-ID: <3AF92A85.882CFA6D@brighton.ac.uk> References: <9cukad$nn68@news-dxb> <9d1ilh$g397v$1@ID-22205.news.dfncis.de> <9d22ji$g7jr5$1@ID-22205.news.dfncis.de> <3AF8184F.3D7ADD74@brighton.ac.uk> NNTP-Posting-Host: pcje.it.bton.ac.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: saturn.bton.ac.uk 989407877 27322 193.62.183.48 (9 May 2001 11:31:17 GMT) X-Complaints-To: news@bton.ac.uk NNTP-Posting-Date: 9 May 2001 11:31:17 GMT X-Mailer: Mozilla 4.6 [en] (Win95; I) X-Accept-Language: en Xref: newsfeed.google.com comp.lang.ada:7360 Date: 2001-05-09T11:31:17+00:00 List-Id: Brian Rogoff wrote: > > 1) Perl is good for string slinging. If I want to slurp a whole > > file into a string and do pattern-based substitutions or chop > > it up into an array of smaller strings, it's easy to do so. > > Any reason that GNAT's Spitbol and Regexp packages won't do? I mean, if > you're going to use Perl or Tcl the argument that these aren't standard > Ada isn't so strong. Uh huh. But if I do any work for a client who doesn't use GNAT, I don't necessarily have copies of these handy. It's the old standardisation problem again. > In any case, I can think of better string slinging languages. I think one > reason that Perl beat the stuffings out of Icon is that Perl always had a > rich set of interfaces to the system (files, dirs, sockets, etc.) that > Icon lacked until recently. Yup, that's exactly it. I use Perl for situations where I want to do things that are easy to do in Perl, where another language falls down for lack of support for some aspect of the problem. Partly it's laziness (I know Perl better than I know Python, so I can get Perl code up and running faster). > > 2) Perl has associative arrays (hashes). I really wish Ada did. > > I don't want to have to reinvent the wheel, or use a proprietary > > package to avoid doing so. And I use hashes all the time. > > Yes. But GNAT has those too. I agree that it would be better for there to > be a few good standard Ada solutions. I reinvent the wheel all the time > :-(. The lack of standard libraries by comparison with C++, Java and so on is a major problem IMHO. > > 3) Perl has a lot of support for other things: databases, HTML, > > XML, sockets, and so on. There's usually a tool I can use for > > most problems I'm faced with. > > That's not true for most of the problems I work on, but I agree that Perl > libraries have a lot of generally useful stuff covered. Perl does a good job of making third-party libraries standard via CPAN, so that they seem like standards. If nothing else, CPAN is a major advantage for Perl. > > I probably would use Ada if I could solve the problems I use Perl > > for as easily as I can in Perl. > > Personally, I loathe Perl, but I have to admit it that it is pretty useful > as an interface to some view of a Unix like world. > > I'm a fan of static typing, so most scripting languages aren't really for > me. I'd rather hack a decent functional language than hack scripts. > However, Python and Ruby are probably good enough > > > Sometimes, when Perl won't do, I turn to Python instead. If I'm writing > > code that involves sockets and URLs and graphics (but little > > string-slinging), I use Java because Java has a good set of tools for > > jobs like that. And so on. > > We use OCaml for lots of scripts and it generally outperforms Python and > Perl by a wide margin when slurping texts and binaries. Perl also > outperforms Python by a wide margin. Gotta admit that Zope is cool and we > won't rewrite that in OCaml ;-). Must admit, I've never tried OCaml in anger. > > Maybe one day, Ada will have a rich standard set of APIs that will > > cover all the bases, but in the meantime it lacks standard data > > structures, GUI support, networking, XML... despite the efforts > > that various individuals have made to remedy these defects. And > > that is a serious limitation IMHO. > > I agree, but I think the problems are largely political now. There are > lots of libraries, but what would be useful is to have a bunch of them > in some standard hierarchy, and working well together, with a relatively > unrestrictive license for the APIs. Uh huh. We need a CAAN to rival CPAN, perhaps? ----------------------------------------------------------------- John English | mailto:je@brighton.ac.uk Senior Lecturer | http://www.it.bton.ac.uk/staff/je Dept. of Computing | ** NON-PROFIT CD FOR CS STUDENTS ** University of Brighton | -- see http://burks.bton.ac.uk -----------------------------------------------------------------