[racket] Lunch choosing program ported from Haskell to Racket

From: Brian Adkins (racketusers at lojic.com)
Date: Thu Jul 3 11:52:57 EDT 2014

Hi all:

I've recently begun learning Racket. After making some progress through various books & tutorials, I took a shot at porting a non-trivial program I had written in Haskell to help choose a lunch place for a group of colleagues based on personal rankings of restaurants and individual history of visiting restaurants.

The Haskell code was quite unpolished to begin with, so when you combine that with my very limited Racket knowledge, the ported code has much potential for improvement :) Both versions are in this gist:

https://gist.github.com/lojic/d45437453ccc8bcba196

I'm mainly posting this because I thought the comparison was interesting, but I'm also very open to any suggestions for improvement, pointers to good sources of info, etc. I've already read Realm of Racket, and I'm working through The Little Schemer, How to Design Programs & The Scheme Programming Language concurrently with plans for SICP a little later.

One of the things I've enjoyed with Haskell is its incredible concision; I was surprised at how well Racket did with the port above, although I do miss Haskell's list comprehensions and syntactic support for pattern matching. I'm willing to give up some concision for uniformity of syntax and the benefit of macros that I'm hoping to realize at some point.

I'm leaning toward going to Strange Loop and RacketCon this year if I can free up time on my schedule; it would be great to meet some folks in the Racket community.

Thanks,
Brian

--
Brian Adkins
Lojic Technologies, LLC
http://lojic.com/



Posted on the users mailing list.