elixir-lang.github.com icon indicating copy to clipboard operation
elixir-lang.github.com copied to clipboard

Improve 'Types and Specs' introduction

Open ctstacey opened this issue 2 years ago • 2 comments

Clarifies the statement "all types in Elixir are checked at runtime". They are not checked per say, exceptions are thrown. Thus I think it's better to say "Types are not checked at compile time".

Expands on what Types and Specs are useful for (i.e. documentation, code clarity, static code analysis).

ctstacey avatar Oct 16 '22 11:10 ctstacey

They are actually checked at runtime. Every time we do an operation, such as addition, we check the type and raise if they are invalid. You get exceptions as a consequence of the check :)

josevalim avatar Oct 16 '22 13:10 josevalim

Thanks Jose, fair comment. Is there anything in the second paragraph you feel worth pulling, or shall I close the PR?

ctstacey avatar Oct 16 '22 23:10 ctstacey

Thanks for considering my PR and for the feedback 👍 😃

ctstacey avatar Oct 17 '22 11:10 ctstacey

:green_heart: :blue_heart: :purple_heart: :yellow_heart: :heart:

josevalim avatar Oct 17 '22 11:10 josevalim