Haskell or Python!

Ralf Muschall rmuschall.fih at t-online.de
Fri Feb 4 02:01:15 CET 2000


Jason Stokes wrote:

> >- Can Haskell be used as interpreted language so that the animator
> >  can code interactively in the animation software
> Yes.  There's an implementation called "HUGS" which is interpreted.

Yes or no, depending on what Sunil wants exactly.
It is impossible [1] to add a function (or variable) definition
at the interactive prompt, since this would violate the
functionality. But you can type metacommands (beginning with
a colon) to (re)load the source file, and evaluate expressions
interactively (which might cause the animations to move).

> >- Is Haskell matured to provide good support to libraries such as I/O
> >  GUI, network like Python

>                                       Haskell is especially weak on IO,
> being a pure functional language.  Haskell is designed mainly to be of

The first line (non-IO-part deleted) may be true, but the second
line is IMHO not the reason.
Haskell is rather young, and the population hacking it is not the
one who needs Tkinter, PIL and NumPy everyday.
OTOH, the IO system is well adapted to scan and parse hairy stuff
(there are XML libraries and Haskell compilers in Haskell).

> >- Is it dynamically typed. I mean can I get full information of type
> >and
> >  its constituents (members) dynamically.

In the interpreter, you can switch on an option which shows
you the type of every evaluated expression together with the
value. The program itself has (AFAIK) no access to this 
information. It is neither needed nor available (AFAIK) at
runtime in compiled programs.

[1] Strictly spoken, this is untrue: One might "load the source file"
    /dev/tty :-)

Ralf



More information about the Python-list mailing list