home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c:19520 comp.lang.pascal:8025 comp.lang.prolog:2348
- Path: sparky!uunet!munnari.oz.au!goanna!ok
- From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe)
- Newsgroups: comp.lang.c,comp.lang.pascal,comp.lang.prolog
- Subject: Re: Assessing a language
- Message-ID: <16332@goanna.cs.rmit.oz.au>
- Date: 11 Jan 93 06:28:24 GMT
- References: <nharvey.726285484@probitas>
- Followup-To: comp.lang.prolog
- Organization: Comp Sci, RMIT, Melbourne, Australia
- Lines: 35
-
- In article <nharvey.726285484@probitas>, nharvey@probitas.cs.utas.edu.au (Nicole Harvey) writes:
- > hi,
- > I am involved in assessing a language. Does anyone know of a standard
- > set of problems that I could use to judge the languages compabilities?
- > Can anyone think of a problem that represents a real need in a language?
- > For example, we have tested it for the eight queens problem to show that
- > it can do state space searches. We have also made sure it can generate the
- > Fibonacci numbers. Can you think of any other well known problems?
-
- I note that this is posted to comp.lang. c, pascal, prolog.
- Obviously, to be fair to Prolog, you should include something like
- - a parser for a large fragment of a human language; Chat-80 is
- available for research use and you might try to adapt that grammar
- - a nonlinear planner
- - a polynomial manipulation package (got to have SOMETHING C can do...)
- and in order to be fair to C, you should include something like
- - the X window system
- and in order to be fair to Pascal, a Pascal compiler.
-
- If you expect to get anything meaningful out of a handful of toy problems,
- forget it. The results would be a far worse joke than my first paragraph.
- ANY programming language can do state space searches, and how hard it is
- depends largely on how much of a library you have, not on the syntax of
- the language. ANY programming language (even BASIC restricted to 26
- scalar variables) can compute Fibonacci numbers. I can solve a set of
- linear equations in Prolog in two lines (one line to load the appropriate
- library package and one line to call the appropriate routine). The same is
- true in TURBO Pascal, or Fortran, or C.
-
- As for Fibonacci numbers, consider the following lazy functional definition:
- let fib = 1 : 1 : map2 (+) fib (tl fib);
- Hard to beat that. It has been argued that lazy evaluation is extremely
- important, yet there are no lazy languages in your list, not even Scheme
- with "streams" (see Abelson & Sussman, Structure & Interpretation of
- Computer Programs).
-