* Re: general-purpose vs domain-specific programming languages
@ 1998-01-08 0:00 Marin David Condic, 561.796.8997, M/S 731-96
1998-01-10 0:00 ` Nick Roberts
0 siblings, 1 reply; 2+ messages in thread
From: Marin David Condic, 561.796.8997, M/S 731-96 @ 1998-01-08 0:00 UTC (permalink / raw)
gwinn@res.ray.com writes:
>
>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.
>
<snip>
Well that would explain where it would be difficult to implement
Perl functionality in Ada and why it might not matter anyway. As
you say, Perl aims for quick-and-dirty hacks and that is
definitely not what Ada aims at.
Still, I think there might be some value in looking at what Perl
(or any other language) may provide which could be useful in an
Ada implementation. The original complaint, as I recall, that
Terry had was that there was no primitive for scanning a text file
for a string and replacing it with another string. That would seem
to be a useful bit of functionality to have in ones Ada bag of
tricks. I've built dozens of "utility" packages which provide
things like linked lists, command line interpreters, string
manipulation primitives, realtime control utilities (digital
filters, etc), math functions and lots of other things which are
useful in building systems. Often these utilities mimic
functionality which might just naturally exist in some other
language. If there is some definable chunk of Perl functionality
which could be utilized in building Ada programs, why not make a
package to provide those services?
In general, I prefer to avoid mixed language systems because of
the cost of maintaining them. (You've got to license two or more
compilers/development suites, keep the knowledge base around,
worry about divergence and later incompatibilities, porting
issues, etc.) There are certainly tasks that are performed better
by different languages, but if I've got, say 95% of my system best
served by Ada and 5% best served by Perl (or Forth, or Lisp...) I
might find it to my advantage to go ahead and take the hit of
developing the capability of doing that remaining 5% in Ada just
to avoid having to drag around a second language and all the risks
associated with that.
So might there be some set of Perl primitives that could be
duplicated in an Ada environment?
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
=============================================================================
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: general-purpose vs domain-specific programming languages
1998-01-08 0:00 general-purpose vs domain-specific programming languages Marin David Condic, 561.796.8997, M/S 731-96
@ 1998-01-10 0:00 ` Nick Roberts
0 siblings, 0 replies; 2+ messages in thread
From: Nick Roberts @ 1998-01-10 0:00 UTC (permalink / raw)
I've often found there is much mileage in developing very simple
interpreters, which are written in Ada, but which provide a separate
environment and language for doing a very specific job.
The 'environment' is typically line-oriented interaction (about as simple
as it can get); sometimes 'batch' file capability needs to be added (also
very simple: just read a named text file instead of current input).
As long as the syntax is kept very simple (cf. the 'ed' of UNIX), the
interpreter is easy to maintain, yet provides the thing it most needs to:
convenience. It is likely to be less convenient to have to write and
compile an Ada program to do something that would be a one-liner for such
an interpreter.
The biggest drawback tends to be psychological: persuading people to learn
the new syntax. Programmers seem to have a pathological neophobia when it
comes to this sort of thing!
--
Nick Roberts
Croydon, UK
Proprietor, ThoughtWing Software; Independent Software Development
Consultant
* Nick.Roberts@dial.pipex.com * Voicemail & Fax +44 181-405 1124 *
*** Eats three shredded spams every morning for breakfast ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1998-01-10 0:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-01-08 0:00 general-purpose vs domain-specific programming languages Marin David Condic, 561.796.8997, M/S 731-96
1998-01-10 0:00 ` Nick Roberts
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox