[Grace-core] Parsing ambiguity

Michael Homer mwh at ecs.vuw.ac.nz
Wed Jul 2 00:50:32 PDT 2014


On Wed, Jul 2, 2014 at 7:40 PM, Timothy Jones <tim at ecs.vuw.ac.nz> wrote:
> On 02/07, Marco Servetto wrote:
>> yes, but if Grace is for teaching, we have to be -as bad- as the other
>> languages, or if possible, as bad as all of them at the same time.
>
> But the argument against consistency with other languages here is that we have
> one-indexed lists, so it's not even the same behaviour as subscripting in other
> languages.
ALGOL, COBOL, Fortran, Lua, PL/I, Smalltalk*, and some modules in some
Visual Basic programs would like a word with you.

(Suggestion: indexing should be by opaque arbitrary objects,
determined by a non-repeating iterable provided at creation time:
array.new(1..10), array.new(10..100..2). Pascal actually does this
right.)
-Michael
* Of course.


More information about the Grace-core mailing list