Interval new feature

Bert Freudenberg bert at freudenbergs.de
Sun Apr 29 21:06:16 UTC 2007


On Apr 29, 2007, at 16:52 , nicolas cellier wrote:

>
> After reviewing some of Interval bugs, I discovered this one:
>
> (10 to: 12) at: 1.5.
> Will answer 10.5.
>
> So maybe this is not a bug but a funny undocumented feature.

It's a bug. Intervals are Collections, and collection indices must be  
integral (see Interval>>at:). You should safely be able to, e.g.,  
convert the Interval into an Array and have the semantics stay the same.

> Anyone ever thought of using such feature?

Having an interpolating collection would be nice at times, but I  
wouldn't misuse Interval for that.

Maybe adding an #interpolatedAt: method would make this available in  
a better way. Probably someone even implemented this, including  
support for different interpolation styles.

- Bert -





More information about the Squeak-dev mailing list