🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #3709

Dynamic typing, part 4 (was Re: definitions)

#3709
From: Raul Rockwell
Date: Tue, 30 Apr 1991 02:26
31 lines
1923 bytes
Thomas Breuel:
>   ;;; Scheme
>   (define (fermat-conjecture-is-true?) ...)
>   (define (f) (if (fermat-conjecture-is-true?) 9 #f))
>   (define (g) (+ (f) 1))
>   (g)

As TMB points out, it is quite easy to forbid such programs based on
static analysis (if you wish).  It may be that scheme currently lacks
the tools to do this, but scheme is peculiarly suited for _writing_
such tools.

> Static typing is added functionality in the compiler.

Or in a lint-like program used independentally of the compiler.

   [ .. these may occur in code used very rarely .. ]
> Trivial type errors like this occur even in well-written programs, and
> cannot be caught by many well-designed dynamically typed languages
> (like Scheme) at compile time.

(1) the advantage of an interpreted language like Scheme is that you
can test code that is called rarely.  Scheme also allows you to easily
build "test-beds" for independantally testing sections of a large
program.

(2) a dynamically typed language should allow you to _reduce_ the
number of tests and branches in your programs, compared to the same
program written in a statically typed language.

Raul Rockwell
Technical Details
Message-ID: <short.3@socrates.umd.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!udel!haven.umd.edu!socrates.umd.edu!socrates!rockwell
References: <2494@optima.cs.arizona.edu> <51984@nigel.ee.udel.edu> <333124@socrates.umd.edu> <11525@mentor.cc.purdue.edu> <TMB.91Apr29022852@volterra.ai.mit.edu> <ROCKWELL.91Apr29091355@socrates.socrates.umd.edu> <TMB.91Apr29182914@volterra.ai.mit.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!udel!haven.umd.edu!socrates.umd.edu!socrates!rockwell
From: rockwell@socrates.umd.edu (Raul Rockwell)
Newsgroups: comp.lang.misc
Subject: Dynamic typing, part 4 (was Re: definitions)
Message-ID: <short.3@socrates.umd.edu>
Date: 30 Apr 91 02:26:02 GMT
References: <2494@optima.cs.arizona.edu> <51984@nigel.ee.udel.edu>
 <333124@socrates.umd.edu> <11525@mentor.cc.purdue.edu>
 <TMB.91Apr29022852@volterra.ai.mit.edu>
 <ROCKWELL.91Apr29091355@socrates.socrates.umd.edu>
 <TMB.91Apr29182914@volterra.ai.mit.edu>
Sender: rockwell@socrates.umd.edu (Raul Rockwell)
Organization: Traveller
Lines: 31
In-Reply-To: tmb@ai.mit.edu's message of 29 Apr 91 22: 29:14 GMT