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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dd4586b9dd51c602 X-Google-Attributes: gid103376,public From: "Marin David Condic, 561.796.8997, M/S 731-96" Subject: Re: general-purpose vs. domain-specific programming languages Date: 1998/01/12 Message-ID: <98011217550672@psavax.pwfl.com>#1/1 X-Deja-AN: 315366257 Sender: Ada programming language Comments: To: wheeler@ida.org X-VMS-To: SMTP%"INFO-ADA@VM1.NODAK.EDU" X-VMS-Cc: SMTP%"wheeler@IDA.ORG",CONDIC Newsgroups: comp.lang.ada Date: 1998-01-12T00:00:00+00:00 List-Id: David Wheeler writes: >So, why do I use Perl when I choose to do so? The answer is >listed above: it includes a large number of built-in capabilities in its >libraries. In particular, it has a rich regular expression system >that I find very useful (for matching, substituting with great control, >and splitting). It also has capabilities for handling lists >of files & option flags in the command line, associative arrays, >and growable arrays. Yes, I could implement that in Ada, but >it's faster to use a poorer language with already-implemented, >already-tested components than a better language without them. > I have no problem using some esoteric language for quickie hacks instead of writing it out in Ada. I still do some things with DCL jobs - not all things worth doing are worth doing well. I think my point was that if there were some specific useful features of Perl that could be functionally duplicated in Ada, it might be worth having a collection like this around. I think the original example was to search & replace a string in a text file. Without implementing anything more than this, you would have a useful tool for Ada programmers. I'd hate to try to duplicate all of the functionality of Perl, or any other language in Ada - you'd end up trying to do some serious tough work which probably would satisfy no one. But individual capabilities might not pose this big a problem as long as one was not trying to duplicate the entire flavor of the language. (Ex: I recall some version of Basic that allowed you to do matrix math operations - without duplicating all of Basic, wouldn't it seem useful to build a package that provided this capability? Certainly, the Information Systems annex of the ARM was a reasonable attempt to steal from Cobol something Cobol did very well.) >Feel free to come up with a list of primitives and semantics, I'd love >to see it. Implementing them is doable, but nontrivial. > I don't speak Perl - I was trying to be helpful in response to someone else's complaint that Ada lacked features found in Perl. You are probably right about it being a non-trivial body of work, but there may be peices still worth doing. >And as others have noted, each language has different strengths. >Perl is usually used for short trivial programs (say <1K lines), where Ada's >readability and programming-in-the-large capabilities are not as obvious. >Use the tool appropriate to the job; the choice of programming language for >a given task is an engineering decision. > Dittos. But I still like to "extend" Ada by building utility software that does useful stuff - sometimes stealing from other languages things they do well. Sure, Lisp can do slick things with lists much better than off-the-shelf Ada - but you can build list tools in Ada and keep them in the bag of tricks, possibly avoiding the headaches of mixed-language programming. MDC Marin David Condic, Senior Computer Engineer Voice: 561.796.8997 Pratt & Whitney GESP, M/S 731-95, P.O.B. 109600 Fax: 561.796.4669 West Palm Beach, FL, 33410-9600 Internet: CONDICMA@PWFL.COM ============================================================================= "I filled out an application that said, 'In Case Of Emergency Notify'. I wrote 'Doctor'... What's my mother going to do?" -- Steven Wright =============================================================================