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-08 11:37:28 PST Path: newsfeed.google.com!newsfeed.stanford.edu!newsfeed.mesh.ad.jp!sjc-peer.news.verio.net!news.verio.net!sea-read.news.verio.net.POSTED!not-for-mail Newsgroups: comp.lang.ada From: Brian Rogoff Subject: Re: Beginner's Language? In-Reply-To: <3AF8184F.3D7ADD74@brighton.ac.uk> Message-ID: 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> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Tue, 08 May 2001 18:37:26 GMT NNTP-Posting-Host: 206.184.139.136 X-Complaints-To: abuse@verio.net X-Trace: sea-read.news.verio.net 989347046 206.184.139.136 (Tue, 08 May 2001 18:37:26 GMT) NNTP-Posting-Date: Tue, 08 May 2001 18:37:26 GMT Organization: Verio Xref: newsfeed.google.com comp.lang.ada:7335 Date: 2001-05-08T18:37:26+00:00 List-Id: On Tue, 8 May 2001, John English wrote: > I am well known as an Ada advocate, but... Well, not after this! :-) > Jochen Schmidt wrote: > > 1) The things Perl is optimized for is not the kind of work I want do be > > paid for. I think Perl is ok for an admin that needs to automate some > > things or probably some bad Webdesigner who knows nothing better. > > I tend to use Perl *a lot* for a variety of jobs. Why don't I use > Ada for these? Well... > > 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. 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. > 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 :-(. > 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. > 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 ;-). > 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. > > I'am neither an admin nor a Webdesigner. > > Me neither. > > > 2) There is no real practical side when talking on programming languages > > if a language is bad on it's language-theoretic concepts it cannot be > > _really_ good for practical issues. > > That's like saying a Swiss Army knife is a "bad" tool. It may not > be as good as a scalpel or a power screwdriver for particular jobs, > but it's better than either if you want to get a splinter out of your > hand or open a bottle of wine (or both :-). I don't think this analogy is useful. I think Jochen is saying that since both theoretic "beauty" and pragmatic utility are achievable, that a language which eschews one in favor of the other is really suboptimal. Unfortunately, all languages do this more or less, including Ada. -- Brian