From fab9a6471d6d175b8c3ddb5a475b72d3ebc06e22 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 8 Dec 2022 10:53:37 +0200 Subject: Update content for html --- gemfeed/2010-04-09-standard-ml-and-haskell.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gemfeed/2010-04-09-standard-ml-and-haskell.html') diff --git a/gemfeed/2010-04-09-standard-ml-and-haskell.html b/gemfeed/2010-04-09-standard-ml-and-haskell.html index 816562b0..f70b7b8c 100644 --- a/gemfeed/2010-04-09-standard-ml-and-haskell.html +++ b/gemfeed/2010-04-09-standard-ml-and-haskell.html @@ -9,7 +9,7 @@

Standard ML and Haskell

-

Published by Paul at 2010-04-09

+

Published by Paul at 2010-04-10 00:57:36 CEST

I am currently looking into the functional programming language Standard ML (aka SML). The purpose is to refresh my functional programming skills and to learn something new too. Since I already knew a little Haskell, I could not help myself, and I also implemented the same exercises in Haskell.

As you will see, SML and Haskell are very similar (at least when it comes to the basics). However, the syntax of Haskell is a bit more "advanced". Haskell utilizes fewer keywords (e.g. no val, end, fun, fn ...). Haskell also allows to write down the function types explicitly. What I have been missing in SML so far is the so-called pattern guards. Although this is a very superficial comparison for now, so far, I like Haskell more than SML. Nevertheless, I thought it would be fun to demonstrate a few simple functions of both languages to show off the similarities.

Haskell is also a "pure functional" programming language, whereas SML also makes explicit use of imperative concepts. I am by far not a specialist in either of these languages, but here are a few functions implemented in both SML and Haskell:

-- cgit v1.2.3