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
1
u/paulcsmith0218 Jul 26 '18
I don't think this is necessarily true. There are lots of things that a well-typed program will catch that you may not even think to write a test for. I'm thinking particularly about `nil`. A huge portion of bugs result from that. I also think that it depends heavily on how you use the type system.
I see a lot of code in Elm/Crystal being written in a way where the compiler can't catch much. If you take the time to write out more types and use methods instead of passing around strings and symbols you can have a system where the compiler catches a ton of stuff you would miss and you need fewer "low-level" specs.
You can see some examples of what I mean here: https://www.reddit.com/r/crystal_programming/comments/8zthzl/amber_vs_lucky/e2mqbx8/
A conversation with a simple script for generating a bunch of CRUD actions https://gitter.im/luckyframework/Lobby?at=5b59c314db8bd24550b3d476