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 X-Google-Thread: f43e6,dd4586b9dd51c602 X-Google-Attributes: gidf43e6,public From: Brian Rogoff Subject: Re: general-purpose vs. domain-specific programming languages Date: 1997/12/31 Message-ID: #1/1 X-Deja-AN: 311758125 References: <01bd1616$a9110b40$24326489@Westley-PC.calspan.com> Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: 883608460 22888 bpr 206.184.139.132 Mime-Version: 1.0 Newsgroups: comp.software-eng,comp.lang.ada Date: 1997-12-31T00:00:00+00:00 List-Id: On 31 Dec 1997, Terry J. Westley wrote: > Are you aware of any serious programming language research which > addresses the issues of > > 1) what makes one language more suited to a particular domain than > another, and > 2) how does one decide when to abandon the general-purpose language > in favor of the domain-focused language? These seem more like opinion/experience questions than serious programming language research. > Here are the sorts of questions I would like such research to address: > Why do people use Perl so much for CGI programming? Because much of what you want to do is already done, and there is a module available on CPAN or wherever to do it. > Why can't I write some libraries so that Ada is just as easy to > use to search and replace data in text files as Perl? Because you don't know how to write a regexp matcher in Ada? ;-) Seriously, you can write more general pattern matchers as Ada libraries, or link with existing C/Fortran/Cobol ones if you are using Ada 95, but it takes work. And Perl has certain notational conveniences which Ada doesn't. But for the most part, I think its almost as easy to use an Ada library, and I find that the type safety is a huge benefit. (Note: If you use GNAT 3.10 or greater, you can use the Gnat.Spitbol library which uses SNOBOL4 style patterns. Be warned, it is GNAT specific. Makes you wish Ada had downward closures and out mode functions ;-) > Why is string and list handling so much easier in Tcl and Perl > than in Ada? Lots of built in notation in the language for handling string primitives, and a rich set of basic operations. But the operations can be added easily, so I question your assertion that string and list handling is *so* much easier. IMO, list and string handling is far easier in Icon than either Perl or Tcl, and handling complicated data structures is easier in OCaml. But I still prefer Ada as a general purpose, high performance, mostly type safe language. -- Brian