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

Christian Aistleitner tmgisi at gmx.at
Wed Nov 1 02:10:01 EST 2006


Hello Martin,

>> 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...

I'd be suprised to see that something like that working. Can you give an  
example and demonstrate arbitrary, recursive, parametric types in Lisp?

>
>> > 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!

Let me relate the problem to the fixed point problem in mathematics:

    x = f( x )

. Assume Times, Plus and these things are hidden within the f.
You need the exact solution (No fuzzy domains). So no iteration schemes.  
Furthermore, you have no knowledge about f, other that it's a mapping from  
the reals to the reals (The domain building function can be _any_ domain  
building function).
You can evaluate f only once. And for that evaluation x = f( x ) has to  
hold (No side effects from superfluous domain building).
And you have to solve the problem for all possible values of f (Any domain  
building function should be usable).

That's hard/impossible for CAS. But the Aldor compiler is not a CAS. It  
does not have _any_ computational strengths.

What would you do if there is no finite fixed point?
E.g.:
   X == List( X );


--
Kind regards,
Christian




More information about the Aldor-l mailing list