Cody, greetings my friend. I just have a couple of questions. However, I’m not exactly sure if I’m using the right terms. Here are my questions:
- Though Kotlin allows us to get away with NOT having to declare the ‘var’ or ‘val’ type (whether it is an “Int” or a “String”. etc.), is it better to declare it anyway? Does it make a difference in the speed, or reliability of the application at compile-time, or at runtime? Would declaring the ‘var’ or ‘val’ type (explicitly typing “Int” or “String”) make the application more robust, and reliable?
- Since the “While” function seems very flexible, and able to execute logic the same way the “If” function does, it is possible to just use “While”, and bypass the “If” function completely? It seems that using the “While” function requires fewer lines of code.
Looking forward to your clarifications, and advice.