Miranda: A non-strict functional language with polymorphic types (1985) [pdf]
citeseerx.ist.psu.edu
citeseerx.ist.psu.edu
gcd a b = gcd (a-b) b, if a>b
= gcd a (b-a), if a<b
= a, if a=b
versus Haskell gcd a b | a>b = gcd (a-b) b
| a<b = gcd a (b-a)
| a==b = a
I know it's a small thing and you can get used to such differences but since FP became just an occasional side interest for me, I never made the switch as a heavyish Miranda user to Haskell. For a long time even getting a Haskell compiler to run was a massive pain.So I started using Mark Jones' Gofer[1] interpreter which was trivial to build and still is 20 years later assuming you can find the source tar ball. It kept the nicer syntax of Miranda and added most of the power features of Haskell. I particularly liked the generalized list comprehension feature which really should have made it into Haskell; things like combinator parser code reads beautifully with it.
I know it's what you're used to but Haskell code always looks ugly to me in comparison to Miranda or Gofer.
[1] https://en.wikipedia.org/wiki/Gofer_(programming_language)
Edit: We probably have wars anyway but I think after that our wars are about something that really matters.
gcd a b = gcd (a-b) b if a>b;
= gcd a (b-a) if a<b;
= a otherwise;
https://agraef.github.io/pure-lang/Indeed, it's a great stepping stone to Haskell, with many of the important functional concepts but without some advanced (albeit useful) stuff like monadic programming.
One of the downsides is the ancient Mira console, which can output cryptic error messages, and which doesn't have command history out the box. Nevertheless, it's lightyears faster to start than GHCI, so good for learning.
- Functional Programming - Digital Systems - Principals of Programming Languages.
Compilers was primarily in OCaml, and there were several other courses in Scala.
SML/NJ had the same issue; you can use rlwrap[0] to fix that.
https://www.cs.kent.ac.uk/people/staff/dat/miranda/wadler87....
You get a similar effect in connecting between intent and code when using a more algebraic language versus the Algol-lineage and Lisp-lineage languages. You reduce the semantic distance (especially paired with a good type system from above) from your specification to your executable code.
But in the context on SICP I'm not sure that would be ideal. As that book is about teaching 101 programming by introducing you to the idea of black box abstraction and building a program through layers of abstraction.
Starting with types would be an entirely different approach to go at it.
So personally, in my ideal university, I'd prefer to learn Scheme/LISP as the 101 course introduction to programming and learn a Haskell-esque language the following term and thereafter.
Although that being said, I used a practical language as my introduction to programming (Ruby) before diving into SICP - which really taught me programming. So maybe it's worth going with practical first, then diving into the theoretical underpinning so you fully appreciate and grasp what you are doing.
I remember the first lecture went something along the lines of "Ok, all you smart arses who've mucked around at home with BASIC and think you can program. We're going to teach you Miranda!"
[0]: https://www.microsoft.com/en-us/research/publication/impleme...
Also pretty sure that the CS51 class is sponsored by Jane Street Capital (one of the few companies in the world that uses the language!).