RE: Rob: Q: Re: Major Bug in Interpreter [Attn: Robert Craig]

new topic     » topic index » view thread      » older message » newer message

Robert Craig wrote:
> 
> 
> posted by: Robert Craig <rds at RapidEuphoria.com>
> 
> Vincent wrote:
> > Couldnt you just have made foo[$] translate to foo[length(foo)] in the
> > Euphoria IL?
> 
> I've implemented $ efficiently, so it takes advantage of
> the subscripting that has occurred so far (moving left to right),
> rather than recalculating it. 
>     foo[i][j][k][$] 
> implemented simply as: 
>     foo[i][j][k][length(foo[i][j][k])]
> would not be very efficient.

So how about for the cases where the $ operator is not used, revert to 
the previous method of subscripting (as in 2.4) so that programs that 
require backwards compatibility will not break?

If the subscripting does use $, then use the efficient method that 
refcounts (protects) the LHS variable.  We don't care about backwards 
compatibility in this case, since the $ operator is new to version 2.5.

Regards,
Pete E.

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu