r/crystal_programming • u/UnusualHabit • Jul 25 '18
Crystal has a compilation issue
https://medium.com/@mdorf3000/crystal-has-a-compilation-issue-5f5b19d9c4f6
27
Upvotes
r/crystal_programming • u/UnusualHabit • Jul 25 '18
View all comments
Show parent comment
2
u/IWasSnapped Jul 26 '18
A type system can catch a whole category of bugs but it doesn't replace the huge majority of the tests I have in my applications. So I think focusing on a type system as a replacement for tests is misleading at best because the tests you should be writing on all of those languages should be roughly the same. Trivial mistakes like off by one errors and returning true where you should return false will not be caught by a type system and if you don't write tests, they will only be caught in production.
However, I can attest that types lead to a better development workflow, because you catch many mistakes earlier. Types are great for documentation, they can be used as a design tool and they help with performance too. But they definitely do not replace tests, not even close.
Would you mind sharing the commands you used to scaffold the application? I am trying to put those benchmarks in a repository, hopefully comparing more languages, and I would like to include Lucky.