interpreter features

Eray Ozkural (exa) erayo@cs.bilkent.edu.tr
Tue, 30 Oct 2001 09:56:26 +0200


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 30 October 2001 09:08, Johannes Waldmann wrote:
> > But        Prelude> let {type T = Int;  n = 1 :: T}
> > does not.
>
> yes, local type declarations would be nice (not just for ghci)
> but that requires serious design work (in the type and module system).
> See the recent paper on first class modules posted here.
>

What about my idea? Can't there be a module, say called *interpreter* which 
you can add and remove definitions from on-the-fly? That might not be too 
hard to implement.

Ah, if only I had an "eval" function.

> > I would like too Haskell to behave like a good interpreter, with
> > self-applicability, dynamic features, like, maybe, some Lisp systems do.
>
> If I want LISP, I use LISP, but most of the time I want strict typing
> at compile time, and therefore I use Haskell. Sometimes, I end up
> writing (in Haskell) mini-interpreters (for some domain-specific language).
> Seems like a reasonable compromise.

Yes, but I don't think an interpreter has much to do with dynamic typing. 
There are interpreters for all sorts of languages. It ought to be possible to 
get more interactive after all. ;)

Something that would put you tighter in the loop. Without having to go back 
to the editor edit stuff, reload from interpreter, choke on error, see what 
went wrong, etc. Just scratch some code on the CLI, see what you've defined 
so far, edit the current module, and evaluate what you want to. That should 
be easier than adding new semantics to the language. Kind of like a small 
text editor embedded in the interpreter, isn't that an original idea? :P

Thanks,

- -- 
Eray Ozkural (exa) <erayo@cs.bilkent.edu.tr>
Comp. Sci. Dept., Bilkent University, Ankara
www: http://www.cs.bilkent.edu.tr/~erayo
GPG public key fingerprint: 360C 852F 88B0 A745 F31B  EA0F 7C07 AE16 874D 539C
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE73l0qfAeuFodNU5wRAvoYAJ49wJc9+2VNu4JrhBIgGud5+2bdngCcCQBr
1uIhmNpIysemCTMKEFvS1tY=
=wXel
-----END PGP SIGNATURE-----