[Omake] lazy values in arrays?

Aleksey Nogin nogin at metaprl.org
Mon Jan 29 10:14:35 PST 2007


On 29.01.2007 00:55, Erick Tryzelaar wrote:

> I'm trying lazy array construction, and I ran into another bug. It looks 
> like you can't access a field through a lazy value. For instance:
> 
> % X. =
> X>        X. =
> X>           foo[] = 1 2 3
> X>           bar = $`(array $(foo), 4)
> X>           .
> .
> % echo $(X.bar.map $(fun o, $o))
> *** omake error:
>   File -: line 3, characters 15-21
>   unbound variable: foo

This is expected - foo is no longer in scope. Use $(X.foo) if you want 
the lazy binding to work after you left the X's scope or use $,(foo) if 
you want eager binding.

> Also while we're talking about member access, what about supporting 
> "$($(foo bar).baz)" style expressions?

This might be worth considering, but it wouldn't happen overnight. Feel 
free to file an RFE in Bugzilla (making sure it is assigned to Jason, 
who is our main grammar guru).

Aleksey


More information about the Omake mailing list