[Haskell-cafe] I think someone had a complicated program to use brackets for array indexing - is it possible to use a DSL for this?

ok at cs.otago.ac.nz ok at cs.otago.ac.nz
Tue Jun 2 00:48:10 UTC 2015

> I'm a part time tutor even though I don't look Elizabethan
> I was trying to lower the learning curve for students

Using square brackets for array indexing in Haskell
would be more a case of putting a stumbling block in
their way than lowering the learning curve.

Fortran uses A(I), not A[I], and has for the last fifty-some
years.  The official definition of Simula 67 uses A(I) as
well, despite its predecessor Algol 60 using a[i].  COBOL
uses A(I), and has done so nearly as long as Fortran.  PL/I
(yes, it still exists) uses A(I), not A[I].  BASIC uses
A(I), this is still so in Visual Basic.NET.  If memory
serves me correctly, MINITAB uses parentheses, not brackets.

Is a pattern beginning to emerge?

Lying to the students by implicitly telling them "all programming
languages use square brackets for array indexing" will be doing
them no favour.  Even lying about Haskell is no kindness.

More information about the Haskell-Cafe mailing list