[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Swarm technology preview
From: |
Rod Price |
Subject: |
Re: Swarm technology preview |
Date: |
Mon, 25 Oct 1999 15:07:25 -0600 |
Hooray for declarative programming! I'm working hard to get some
aspects of it injected into my organization at TRW. I think it
will be a wonderful interface for Swarm.
I did want to comment, however, on the distinction you seem to be
making between static, strongly typed imperative languages and
dynamic, weakly typed declarative languages. There are several
declarative (actually, functional) languages which are strongly
typed, yet dynamic in the sense that they use higher-order
functions. Two of the most well-known are Haskell, a pure
functional language, and ML, a functional language with side
effects. Each of these has a very strong (in fact, mathematically
consistent) type system, yet are purely declarative. In Haskell,
for example, you can write a quicksort as
quicksort [] = []
quicksort (x:xs) = quicksort [ y | y <- xs, y <= x]
++ [x]
++ quicksort [ y | y <- xs, y > x]
The Haskell interpreter (or compiler) infers the type of the
function quicksort at compile time as
quicksort :: [a] -> [a]
meaning quicksort takes a homogeneous list of data (Ints, Floats,
or anything else) and returns another homogeneous list of the
same type of data. Any other attempted use of quicksort gives an
error at compile time, not at runtime.
Personally, I think that this combination of strong typing and
declarative programming is very powerful. I find that if I can
get a function to compile, it will usually do what I expect.
You can find out more about Haskell at http://www.haskell.org, and
the Objective CAML dialect of ML at http://pauillac.inria.fr/ocaml/.
-Rod Price
TRW Denver
303-360-4428
"Marcus G. Daniels" wrote:
>
> Here's a heads-up on recent developments of the Swarm Development Group.
> This is a paper and some associated software for a talk I gave at a
> a workshop on agent-based simulation at the University of Chicago.
>
> http://www.santafe.edu/~mgd/anlchicago.html
> ftp://ftp.santafe.edu/pub/swarm/users-contrib/anarchy/anl-0.0.tar.gz
> http://www.cas.anl.gov
>
>
==================================
Swarm-Modelling is for discussion of Simulation and Modelling techniques
esp. using Swarm. For list administration needs (esp. [un]subscribing),
please send a message to <address@hidden> with "help" in the
body of the message.
==================================