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: gwinn@res.ray.com (Joe Gwinn) Subject: Re: general-purpose vs. domain-specific programming languages Date: 1998/01/07 Message-ID: #1/1 X-Deja-AN: 313725642 Content-Transfer-Encoding: 7bit References: <98010512040396@psavax.pwfl.com> Content-Type: text/plain; charset=us-ascii Organization: Raytheon Electronic Systems Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-01-07T00:00:00+00:00 List-Id: In article <98010512040396@psavax.pwfl.com>, "Marin David Condic, 561.796.8997, M/S 731-96" wrote: > "Terry J. Westley" writes: > >Here are the sorts of questions I would like such research to address: > > Why do people use Perl so much for CGI programming? > > 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? > > Why is string and list handling so much easier in Tcl and Perl > > than in Ada? > > [snip] > I'd suspect that if you could come up with a list of your favorite > Perl primitives and a description of their semantics, it would be > possible to build an Ada package that provided equivalent > features, perhaps by utilizing the Ada.Strings... packages as the > underlying implementation. (Maybe you'd like to e-mail me some > examples and we could investigate how difficult the job might be.) > A decent specification might even gain some wider acceptance as a > defacto standard if it was circulated widely. The preface/introduction to the Perl manual gives the game away. Perl is intentionally designed to allow the violation of the majority of the usual good-programming practices and restrictions, such as the strict type safety that Ada is so famous for. Why did they do such a thing? For expediency. Perl was intended to ease the writing of small one-shot programs, not the implementation of large and critical systems. So, perl has essentially no type checking, has lots of string handling and pattern-matching features, et al, while in Ada one would have to invent all that. The CGI stuff is mostly used for web pages, which change fast, so the things we value Ada for in fact just get in the way in such applications, because the programmer-proof safety of Ada makes changes much slower to implement than less fussy languages, and perl is by design the least fussy of all. Does this make perl more error prone? Yes, absolutely. Will webmasters therefore convert to Ada? No, because they value speed over safety, and nobody dies if a webpage fails. The only price is a flood of annoyed emails. Joe Gwinn