🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #3056

Re: Dynamic typing -- To Have and Have Not (was Runti

#3056
From: Chris Dollin
Date: Tue, 19 Mar 1991 08:23
41 lines
2637 bytes
Dan Bernstein writes:

   In contrast, the supposed conciseness of dynamically typed languages
   costs dearly in compile time, run time, and (for projects with many
   debugging runs) programming time. For these disadvantages it would have
   to provide a huge benefit for maintenance, yet its proponents never seem
   to come up with examples showing such a benefit.

Perhaps Dan would like to explain why dynamically typed languages "cost dearly
in compile-time", since the compiler is performing fewer checks? I can think of
three possible interpretations:

(a) The compiler is slower, because it has to generate extra code for the
necessary run-time checks.

Planting a few extra procedure calls is unlikely to take as much time as (say)
doing ML-style type unification.

(b) The compiler is faster, *but* it will be called on to compile entities very
many more times as their trivial type errors are detected.

Removing type errors doesn't tka that long (by observation). Also, for entities
that are complex enough that they take several passes before their type errors
are removed dynamically, they'll probably take several passes through the
static checking compiler - trashing any presumptive speed advantage.

(c) The compiler is written in the language it compiles, hence is dynamically
typed, hence is slow.

Begs the question. Also the compiler (being a relatively fixed application) may
have had optimisations applied to it - such as optional type declarations - to
make it go faster. It may have had optimisations applied to it that are only
possible by virtue of being dynamically typed.

Dan being Dan, he probably has some alternative (i) in mind; perhaps he would
enlighten us.
--

Regards, Kers.      | "You're better off  not dreaming of  the things to come;
Caravan:            | Dreams  are always ending  far too soon."
Technical Details
Message-ID: <KERS.91Mar19082354@cdollin.hpl.hp.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!otter.hpl.hp.com!hpltoad!cdollin!kers
References: <PCG.91Mar13185855@aberdb.test.aber.ac.uk> <18926:Mar1422:18:5691@kramden.acf.nyu.edu> <1991Mar16.052952.10201@cs.cmu.edu> <352

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!otter.hpl.hp.com!hpltoad!cdollin!kers
From: kers@hplb.hpl.hp.com (Chris Dollin)
Newsgroups: comp.lang.misc,comp.object
Subject: Re: Dynamic typing -- To Have and Have Not (was Runti
Message-ID: <KERS.91Mar19082354@cdollin.hpl.hp.com>
Date: 19 Mar 91 08:23:54 GMT
References: <PCG.91Mar13185855@aberdb.test.aber.ac.uk> <18926:Mar1422:18:5691@kramden.acf.nyu.edu> <1991Mar16.052952.10201@cs.cmu.edu> <352
Sender: news@hplb.hpl.hp.com (Usenet News Administrator)
Organization: Hewlett-Packard Laboratories, Bristol, UK.
Lines: 41
In-Reply-To: brnstnd@kramden.acf.nyu.edu's message of 18 Mar 91 03:21:05 GMT
Nntp-Posting-Host: cdollin.hpl.hp.com