|
|
|
|
|
by lmm
2957 days ago
|
|
> Interestingly crystal has neither sum types or pattern matching (and it doesn't need them) :) Well, the use cases will be there, and any general-purpose language will need answers for them. One can of course achieve the same effect with other language features (e.g. Java's famous use of the "visitor pattern" for those cases), but there's a cost in verbosity and maintainability. |
|
And pattern matching isn't really needed if you have flow typing + OO (at least I haven't found a usecase for pattern matching which crystal doesn't already have an answer to)