Crystal 1.1.0
So I am currently making an api server in Crystal and I adore this language. I would add some pros&#x2F;cons for folks who are interested in trying it out;<p>Pros:<p>- Elegant syntax. Crystal is highly inspired by Ruby and it has a lovely elegant syntax. Syntax is important to me and the clutter of symbols and the busy syntax is why i struggle with Rust.<p>- gorgeous type system. F# is the only other language I can think of which has this lovely and complete a type system. The way Crystal handles Nil (its a type) just feels great in practice.<p>- Perf wise, Crystal is blazing fast. It seems to be marginably faster than most compiled languages like Go, Nim etc in the benchmarks. Though at that level the difference isn&#x27;t much.<p>- batteries included stdlib<p>- decent documentation. It could be better but imo its good enough. I rarely have to look beyond the documentation if I get stuck anywhere.<p>- small but amazing community. the folks in the community like Ali, blacksmoke, Oleh, Ary and many others etc are super helpful and always ready to teach a newcomer.<p>Cons:<p>- Lack of Windows support. The biggest elephant in the room. the good news is that this is under development and even in this release a lot of progress towards a Windows event loop was made. But if you are going to do web dev, you can always go with wsl for the compilation as most of us do.<p>- Slow compilation speed. Its faster than Rust&#x2F;C++ but if you are coming from an interpreted language the 5-10 seconds it takes to compile your small project rankles a bit.<p>- DB drivers need to be better. They currently don&#x27;t support pipelining, ssl, async etc. Not a big deal as the Crystal drivers are performant enough. but I think if these were there, Crystal would get at least 20-30 ranks in the techempower Fortunes benchmarks.<p>- IDE tooling is not yet there.<p>- Small community and hence lack of community packages. Often stuff will have to be done by hand. Things like oauth, openssl conversions etc will need some work from you.<p>- no http&#x2F;2 support<p>- The lack of a BDFL and corporate sponsorship. This means that the language growth is less structured and highly dependent on the community leaders.<p>Here is an old comment I wrote about Crystal on HN. it is still as true today as it was then;<p>----------------------------------<p>I have a love-hate relation with Crystal. Every few months, disenchanted with the core maintainers&#x27; priorities, lack of platform and tooling updates and overall deadland syndromes -
I denounce Crystal, promise I will never use it again, startup a golang or Rust project, make some non trivial toy stuff and then come crawling back to Crystal.
I hate the fact that I love this language and the fact that nothing else (except perhaps f# and nim) seems to have the same effect on me.<p>My favorites Crystal features are its do-end syntax, dat sexy type system hnnnnghhh... , domain modelling using sum types, null checking using types, ultra simple OOPs, insanely productive std and its sheer performance.<p>The bits about the language I detest are the overuse of macros, the utter lack of any platform (windows, http&#x2F;2 etc.) or tooling improvements (IDE support, slow compilation). The core maintainers are amazing but have a weird obsession with just refactoring the language semantics. Things which really would matter for any language usage are just relegated to GH issues which haven&#x27;t had any comments on it for months (if not years).<p>The lack of a BDFL and corporate sponsorship really hurts Crystal bad. Its a language without directed growth. For a language which seems to be used the most for web servers, it lacks http&#x2F;2, db pipelining and async db drivers. There have been plans for redoing the http module for years but it hasn&#x27;t been done yet.<p>Yet, I love this language despite all its shortcomings. I find it to be one of the most readable languages out there. The community is full of amazing individuals who are ever helpful and welcoming. The core maintainers are super talented developers who really value quality of code.<p>Right now I am working on an api servers and have 3 early implementations - one in Rust-actix, one in pure crystal (no framework) and one in Go-Fiber. The joy of using Crystal and feeling like I am in control of the project are reasons which are pushing me towards using Crystal for the project. But I know that by the next few years, we likely still wouldn&#x27;t have
http&#x2F;2, async drivers, nice IDE support and many other features that I really need.<p>And so, I will likely have to go with Go. (Rust syntax is just too complex for my taste. And I am not talking about the celebrated borrow checker).<p>I like go.<p>Go is simple.<p>Go is Productive.<p>Go is... just not Crystal.<p>-----------------<p>Epilogue: I did not go with Go. Its error handling and opinionated formatting turned me off so much that I have returned back to crystal. :&#x2F;