Slightly OT: static typing

Richard A. O'Keefe ok@REDACTED
Wed Oct 22 06:20:19 CEST 2003


	Michael Hobbs wrote:
	
	> Has anyone else read "Objects Have Failed" by Richard P. Gabriel?
	> http://www.dreamsongs.com/NewFiles/ObjectsHaveFailed.pdf
	
Yes, last night.

I'm with him part of the way.  The kinds of abstractions you just can't
do in Java are quite frustrating.

However, it is rather odd to see someone whinging about how reuse has
failed when the amount of reuse actually happening these days is
*unbelievable* from the perspective of, say, 30 years ago.

For example, I write my lecture notes using SGML.  I actually do this using
my own text editor, because I'm comfortable with it, but when I use Emacs,
I get an SGML mode that is appropriate for my specific DTD, and I didn't have
to write any of that code.  I have a choice of three free SGML parsers with
pretty much compatible output, none of which I wrote.  To get slides, I have
a back end which uses LaTeX (which I didn't write) to produce Postscript
(one of these days I'll try pdflatex, which again I didn't write) which I
can view on-screen with gv (which I didn't write).  I also have a back end
which turns a whole paper's worth of slides into an HTML 4.01 web (complete
with links to a glossary); I wrote the back end, but there are lots of free
HTML viewers that can be used.  I tested the conversion with Amaya, which is
free source code that I didn't write.  I have a spelling checker which is
a couple of lines of shell code calling a SGML parser, an awk script which
isn't _that_ big, and 'spell', which I didn't write.   I wrote the back ends
and I devised the DTD.  All of my code together comes to less than 2k of
source, including comments and blank lines; dear knows how much code they
call on.

Or look at how much reusable code there is in Erlang.

Or take the statistics package R.  The reference manual for the built in
functions is about 2000 printed pages, and that doesn't include all the
statistical, data mining, and bioinformatics code that's available over the
web, documented to much the same standard.  I can do _amazing_ things in a
few lines of R, that would take me a __long__ time to hack up in C.  And R
talks nicely to Java and Python and Perl and quite a few data bases and ...
If anyone wants to do any statistical processing or data visualisation on
data gathered as part of the operation of an Erlang system, R is just what
the doctor ordered (and it's free...)

I look at the stuff some of our 4th-year students do in graphics; they
accomplish stuff I don't even begin to understand in at most a couple of
thousand lines of code.  They aren't unimaginably good programmers, they
are using enormous libraries that already do most of what they want.

I guess when it arrives packaged in a library (like Erlang/OTP or R or
OpenGL &c) people stop thinking of it as "reuse", but it is, and it's
the big success story of our time.




More information about the erlang-questions mailing list