Re: Are these all really true ?

ok@cs.rmit.edu.au (Richard A. O'Keefe)
Thu, 28 Sep 1995 05:12:56 GMT

          From comp.compilers

Related articles
[12 earlier articles]
Re: Are these all really true ? stefan.monnier@epfl.ch (Stefan Monnier) (1995-09-25)
Re: Are these all really true ? baynes@ukpsshp1.serigate.philips.nl (1995-09-25)
Re: Are these all really true ? bill@amber.ssd.hcsc.com (1995-09-25)
Re: Are these all really true ? cdg@nullstone.com (1995-09-26)
Re: Are these all really true ? ludemann@expernet.com (1995-09-27)
Re: Are these all really true ? J.Biddiscombe@rl.ac.uk (The Lord of Darkness) (1995-09-27)
Re: Are these all really true ? ok@cs.rmit.edu.au (1995-09-28)
Re: Are these all really true ? finger@convex.convex.com (1995-09-28)
Re: Are these all really true ? bates@salsv3.boeing.com (Rodney Bates) (1995-10-03)
Re: Are these all really true ? jjc@hplb.hpl.hp.com (Jeremy Carroll) (1995-09-29)
Re: Are these all really true ? stefan.monnier@epfl.ch (Stefan Monnier) (1995-10-02)
Re: Are these all really true ? scott@infoadv.mn.org (Scott Nicol) (1995-10-02)
Re: Are these all really true ? anton@complang.tuwien.ac.at (1995-10-02)
[5 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers
From: ok@cs.rmit.edu.au (Richard A. O'Keefe)
Keywords: OOP
Organization: Comp Sci, RMIT, Melbourne, Australia
References: 95-09-076 95-09-113
Date: Thu, 28 Sep 1995 05:12:56 GMT

Scott Nicol <scott@infoadv.mn.org> writes:
>Better in what sense? There are fewer hidden side-effects, but
>side-effects aren't always a bad thing. It really depends on what
>the language is designed to do. For example, awk would be unusable
>if it were strongly typed.


Oddly enough, I have a paper design for a "Typed AWK" and have tried
rewriting every AWK script I have access to in it. There is in fact
no practical difference at all. There are a couple of ad-hoc rules
that I had to adopt, such as "if $x is statically an operand of an
arithmetic operator, rewrite it to num($x) during parsing", and of
course the traditional "if a regular expression occurs in a Boolean
context, rewrite it as $0 ~ it during parsing", but they occur before
type checking (or would if I implemented the design). You would be
surprised what straightforward type inference can do for you; the
Typed AWK paper design is a strongly typed _language_ but programs
never explicitly indicate types; it's all done by type inference.


This result did not surprise me. J. Nevil Brownlee wrote a compiler
for a subset of SNOBOL called SNOBAL67 back in the 70s; it compiled
the subset into Burroughs Extended Algol and it relied on type inference
to figure out which variables were numbers, which were strings, and
which were patterns. SNOBOL is a dynamically typed language, but the
subset was quite usable; the main restriction was the lack of arrays
and lists, not the typing.


>>* Memory is free, speed is what is worth optimizing.


>OK.


Academic work in databases is based very much on the idea that memory
is not free, that figuring out what to bring into memory when and how
long to keep it is hard but has huge payoffs.


>>* Formal specifications yield correct programs.


>You can't prove correctness for anything other than the smallest
>program. If specifications yield correct programs, there would
>be no need for regression tests.


Nobody said anyting about proving correctness.
_Informal_ specifications sure as heck don't yield correct programs.


>>* WYSIWYG is better for all applications.


>Some call it WYSIAYG (What You See Is All You Get). There are many
>situations where WYSIWYG is an impediment. For example, try globally
>changing the style of section headings in an MS Word document...


I agree what WYSIAYG.
I note that different people have different encoding strategies, if
you believe the Neurolinguistic Programming people, and that for some
people a word may be worth a thousand pictures.


I further note that the Web is _not_ WYSIWYG.
--
Richard A. O'Keefe; http://www.cs.rmit.edu.au/~ok; RMIT Comp.Sci.


--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.