cc:  [EMAIL PROTECTED]
Subject: Re: [ast-developers] Initialisation of type variables
--------

> I noticed that
> 
>    typeset -T X_t=(
>       typeset a=aha
>       typeset b=${_.a}
>    )
> 
>    X_t x
>    print ${x.b}
> 
> prints nothing. Is this intended or a bug? The corresponding case
Currently the value of _ is currently unspecified in this case.
Are you suggesting that _ be defined for any compound assignment
or just during a type definition?
If it is for every compound assignment, then what is the value
inside a nested assignment?
> 
>    typeset Y=(
>       typeset a=aha
>       typeset b=${Y.a}
>    )
> 
>    print ${Y.b}
> 
> prints "aha", so it appears at least somewhat inconsistent.
I hadn't even realized that this works.  It works because the assignments
are done in order.
> 
> A related question: As ksh now is going object oriented, what about 
> using _() as a constructor and calling it automatically when a variable 
> of this type is defined?
I have been thinking about using the name create in this case so that
if you define a function named create, it will be invoked when each
instance is created.
> 
> Regards,
> Bernd
> 
> -- 
> Bernd Eggink
> [EMAIL PROTECTED]
> http://sudrala.de

David Korn
[EMAIL PROTECTED]
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to