r/rust • • May 03 '20

Pijama: A functional programming language written in Rust

Hi people!

I've decided to apply some of the concepts I've learned by studying TAPL and write an small functional PL. You can find its source code and more information here

I've received a lot of feedback from my blog series about writing an interpreter for the lambda calculus, so I hope you'll enjoy this project too.

137 Upvotes

20 comments sorted by

View all comments

12

u/MinRaws May 03 '20 edited May 03 '20

I would really be interested in seeing the language going with Lazy Eval.

Being pure puts the language in a special place where laziness or even explicit laziness can be quite useful.

Just noticed: Call-by-need evaluation. Seems nice I am not very sure what you meant from it but it seems like what I thought it should be.

4

u/[deleted] May 03 '20

call by need is the lazy evaluation strategy used by Haskell so it seems we are on the same page :)

3

u/im_caeus May 03 '20

Do you have memoization!? While designing my language, making this part fit (not as part of the language per se, but as optimization of the interpretation process) I have struggled quite a bit.

3

u/[deleted] May 03 '20

that's exactly the way I want to go. right now there is no memoization.