Closed SimonLab closed 4 years ago
Thanks @iteles @miguelmartins17 and @nelsonic for all the review! I'll have a look soon at all the comments :+1: I found that having multiple ways to create variables make it harder for beginners to learn the language as you have to already think about the context and situation when writing the code. I'm sure I'll get used to it and in reality only a 1 or 2 keywords are really used.
@SimonLab I agree that the Elm
way is much better whereby the type annotations are applied once to the function (or inferred by the compiler). But I'm not concerned that a beginner will have any issues learning the different situations where a const
is appropriate vs. a var
. I don't see us using var
very often at all ... in fact given our experience of writing Elm
I think we could use const
and final
exclusively in our code ... and we could even just stick with final
everywhere and eliminate any "confusion" altogether. ๐ญ
Thanks for reviewing my review suggestions. ๐
As discussed on standup, merging. ๐
ref: #3 Add documentation on how to declare and initialise variables with Dart.