🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #250

Re: Types, arrays, generality, and notation (was: Fortran90 and Arrays)

#250
From: Stephen P Spackman
Date: Fri, 17 Apr 1992 07:52
51 lines
3621 bytes
In article <SPOT.92Apr16125751@FORTRAN.FOX.CS.CMU.EDU> spot@CS.CMU.EDU (Scott Draves) writes:
|i agree with jim.  a language that is very good at doing things in one
|domain is necessarily not so good at other domains (eg, regexps are a
|specialized language for string searching, they are good for just
|about nothing else).  there are languages that are only somewhat
|specialized towards a particular domain, and they are somewhat
|applicable to other domains (eg snobol).  and there are languages that
|are pretty much neutral wrt domain (eg lisp).

There's a profound difference in kind between regexps and SNOBOL, of
course, since only the latter is a programming language in the usual
sense (perhaps Prolog comes close to the line between the two, but
it's still clearly on the language side).

But take a look at SNOBOL. It has a clear APL-like carrier language:
with strict sequential lines and gotos. Within that it has a
FORTRANesque assignment language. Within that it has specialised
pattern matching facilities.

Now look at Icon. Similar pattern matching, in a structured streams
environment. Look at J: APL with the line-oriented frame largely
removed. Look at Perl: pattern matching bound into a C-cum-BASIC.

|why is this true?  it seems that a language is good at a domain if it
|does a lot of stuff from that domain automatically.  basically, you
|want domain specific stuff baked in.  you might think this is bad, and
|that such things should be provided with libraries, but this is a very
|weak form of support.  could you do TeX with a library?  no.

A library is in no sense a "weaker form of support". It's possible to
provide libraries access to the full syntactic repertoire of the
language (Lisp demonstrates this, as does - almost - J). It's possible
for a library to generate JUST as good code as the "intrinsics" (look
at how MSC compiles strings, look at how Algol 68 and Haskell are
designed).

The traditional difference between libraries and intrinsics is that
you can only redefine the name of a library routine. That is neither a
profound distinction nor one that applies in all languages anyway.

|is this defeatist?  no.  you just need a good way to create new
|languages, and still have them communicate.

If they are communicating then they are in some sense part of the same
language. It's just ugly as hell because you're wrapping in, say, the
Unix shell and C and Lisp.... Well, why not just bring everything
together? Everyone needs function call, after all....
----------------------------------------------------------------------
stephen p spackman         Center for Information and Language Studies
stephen@estragon.uchicago.edu                    University of Chicago
----------------------------------------------------------------------
Technical Details
Message-ID: <STEPHEN.92Apr17025302@estragon.uchicago.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!uwm.edu!linac!uchinews!tira!stephen
References: <ROCKWELL.92Mar21001252@socrates.umd.edu><STEPHEN.92Apr14171919@estragon.uchicago.edu><1992Apr15.201453.10255@newshost.lanl.gov> <STEPHEN.92Apr16042133@estragon.uchicago.edu> <SPOT.92Apr16125751@FORTRAN.FOX.CS.CMU.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!uwm.edu!linac!uchinews!tira!stephen
From: stephen@estragon.uchicago.edu (Stephen P Spackman)
Newsgroups: comp.lang.misc
Subject: Re: Types, arrays, generality, and notation (was: Fortran90 and Arrays)
Message-ID: <STEPHEN.92Apr17025302@estragon.uchicago.edu>
Date: 17 Apr 92 07:52:53 GMT
Article-I.D.: estragon.STEPHEN.92Apr17025302
References: <ROCKWELL.92Mar21001252@socrates.umd.edu><STEPHEN.92Apr14171919@estragon.uchicago.edu><1992Apr15.201453.10255@newshost.lanl.gov>
 <STEPHEN.92Apr16042133@estragon.uchicago.edu>
 <SPOT.92Apr16125751@FORTRAN.FOX.CS.CMU.EDU>
Sender: news@uchinews.uchicago.edu (News System)
Organization: University of Chicago CILS
Lines: 51
In-Reply-To: spot@CS.CMU.EDU's message of 16 Apr 92 17:57:51 GMT