I am excited to be back.
I have had a look at Crystal in 2018, and put it on the back burner due to it not having a 1.0 release yet.
Then I forgot about it and now I rediscovered it and I really like the concise and productive syntax while still being able to produce portable (static) binaries.
I did a quick search and couldn’t find where the list of not done tasks for Crystal (each language) is now. Maybe they axed it (too much work?). I’ll try to see if it still exists later when I have the time.
But you can still see what the done Crystal examples are, and see from the whole list what’s yet to be done in Crystal. That’s a good place to start learning how to use Crystal, the easiest thing being to translate the Ruby example (if it exists) and then Crystalize it into iconic Crystal.
From my point of view, functional programming in Crystal all come from Ruby, if you are a typical Ruby programmer, and know the lambda and Proc.new in ruby, you probably know every things about it, if you are not, only reading The ruby programming language write by the author of Ruby is enough.
You don’t need learn Haskell or Lisp for this purpose.
Quick note: one big difference with Ruby related to functional programming is the struct construct of Crystal. struct objects are allocated in the stack instead of in the heap, and therefore, are copied over (passed as values). As mentioned in the book,
… structs are mostly useful for immutable data types and/or stateless wrappers of other types…
For me, a Crystal user about six months of experience, didn’t find that in the process of using Crystal, there are many functional usages related to struct, admittedly, using struct far more than when using with Ruby, almost always used to hold some structured data, used to replace Hash, you know, type is key, that is the reason, that’s why everyone loves Crystal over Ruby here.