|
|
|
|
|
by vasilakisfil
1919 days ago
|
|
Crystal is a beautiful language, however compiling times is something that put off most people who try it. How comes and they don't allow you to optionally provide types in your function/class signatures so you can help the compiler and speed up the whole process ? I mean global type inference is nice, but giving the option to specify types and speeding up the compiling time would be even more nice. |
|
Perhaps you mean something else, but this is from the book Programming Crystal:
> Returning Values
> A method returns the value of its last expression, so there’s no need to explicitly return that or declare its type. However, if you want to document or directly control that return type, you can explicitly specify the type, as in this example:
> methods_and_procs/methods.cr