5 ms·
I'm the author. I have just released the first alpha. I've been programming Scheme for close to a decade now after about the same amount of time using Perl, and
by pflanze 11y ago
I'm the author. I have just released the first alpha. I've been programming Scheme for close to a decade now after about the same amount of time using Perl, and I've written this to be able to like programming Perl 5 again, when I have reason to use it. It works pretty well for me for that purpose, although I guess I'm biased.
I guess the layout is pretty old-fashioned, and I might have too much text; I'm trying to cater to people who are not used to functional programming yet, but I'm not sure I'm achieving that. I guess it's also a rather difficult sell when many Perlers prefer to use the upcoming Perl 6 instead, and others decide to leave for a more proper functional programming language implementation.
I'm rather proud that I've managed to base lazy sequences on lazily evaluated linked lists, i.e. based on purely functional principles down to the cells, instead of using iterators as many function libraries for sequences for non-functional languages (like JavaScript or C#) do. Not sure how much it matters in practice, but at least you can write lazy sequences with this the same way you do in Haskell (see fibs and primes examples).
There are some good points doing FP in Perl 5 compared to some other non-FP languages (you can do optimized tail-calls pretty cleanly), and some bad points (you have to care about memory handling in some places). I've got ideas how to improve on both fronts but that will depend on the uptake of the project.