[Aldor-l] Name constancy in type context and lazy evaluation

Martin Rubey martin.rubey at univie.ac.at
Tue Oct 31 02:41:17 EST 2006


Dear Christian, *,

This mail is already one day old. You are too fast :-) However, I would still
like to pursue this "philosophical" discussion.

"Christian Aistleitner" <tmgisi at gmx.at> writes:

> > However, I'd say that the more important question is, whether it *should*
> > be allowed or not. It doesn't really make sense to have such a beautiful
> > language imposing conditions that actually restrict it's applicability.
> 
> I'd argue, that what you want requires awfully careful planning within the
> compiler.  It has really tremendous effect on type checking, and what can be
> done statically and has to be done at runtime.  Aldor is too sloppy
> here. Otherwise, you probably would not get your code to compile.

Well, maybe one could have a keyword analogous to "pretend", that tells the
compiler that checking is not necessary.
 
> Are there languages, where you can create _arbitrary_, _recursive_,
> parametric types (I know that Aldor does not have parametric types ;) )
> smoothly at runtime?

As far as I know, ANSI Common Lisp allows that...

> > Do you agree? Or do you think that the current restrictions are
> > necessery/sensible?
> 
> Sadly enough, I guess it's a very natural restriction. I guess, there are
> several workarounds (even for Aldor) if you just need certain kind of
> recursions, but for your grammar parsing code, you want the whole thing.  And
> it means lots of troubles to get this working in a compiler.

Do you know about the troubles involved? I'd be interested to hear more about
that!

-------------------------------------------------------------------------------

I'm absolutely sure that it doesn't make sense to have a compiler (or
interpreter, or whatever) that says: "no, you are not allowed to do that", just
because it *might* be that one runs into trouble later.

The grammar code shows, that in principle it is possible to have Aldor define
mutually dependent recursive types at runtime. Thus there should be a way to do
it in a manner "conforming" to the standard.



Martin




More information about the Aldor-l mailing list