Jerome Quelin wrote:

> My goal is to provide a Befunge interpreter that just does the right thing 
> out of the box - that is, that does not need to patch Parrot in order to 
> function.


Arrays (and all classes) are currently reorganized. The mentioned patch 
is a current hack, to get your expected behaviour.


I'm not totally sure, how we will create all the array variants, we might need:


We have different data type:
- char/short/int/float/double/INTVAL/FLOATVAL/PMC/BIGINT
- bit would need an own class for the index calculation
Range checking:
- strict: throw an exception for get/set
- autoextend: throw an exception for get
- your case: be silent on out of bounds get/pop/shift

Creating a class for each combination would probably be overkill.
We could have classes for the currently used arrays, that is:
- PerlArray (data type PMC, autoextend)
- intlist (data type INTVAL, strict range check)

and a general array class, with an extended "new .array, Px" syntax, 
where Px holds the data type and range check behaviour.


> And remember that I want to have a Befunge interpreter that works "as is". 
> ie, that uses only Parrot basics, and does not need to recompile...


Yes, of course, then ...

> Jerome


leo



Reply via email to