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

Christopher Allen cma at bitemyapp.com
Tue Jun 2 01:06:42 UTC 2015


Strongly agreed with ok and Tikhon. I've tried these weird pidgins and
localized fabrications wrapped around Haskell before, it's only a stumbling
block.

Haskell is simple, you don't have to lie - just encourage them not to draw
false analogies.

On Mon, Jun 1, 2015 at 7:52 PM, Tikhon Jelvis <tikhon at jelv.is> wrote:

> If you teach them about how operators are normal functions in Haskell,
> using an operator to index into an array makes the indexing operation less
> magical—a big pedagogical boon, in my view. The fewer special cases in the
> language you're teaching, the better, and looking similar to other
> languages is not a good reason for a special case.
>
> Especially since the similarity could be misleading!)
>
> On Mon, Jun 1, 2015 at 5:48 PM, <ok at cs.otago.ac.nz> wrote:
>
>> > 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.
>>
>>
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>>
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150601/5850f943/attachment.html>


More information about the Beginners mailing list