However, sometimes my experiments are a bit more complex than testing a random snippet. Each command is stored independently, which ensures I’ll be able to find any previous commands and reuse them. The nice thing we’ve kept from the original REPL in kotlinc is: every intermediate result is being written into variables named res0, res1, and so on. One more thing to notice is that ki highlights the code, so it will be easier for me to read the code I wrote several inputs ago. This is a thing of the past with ki, as there is autocompletion to help! Here’s a quick example of how easy it is to write code in ki with the help of autocompletion. Before ki, you had to go through the documentation a lot while working with kotlinc. The Kotlin collection API is huge, and it’s not humanly possible to remember everything it contains. I like doing quick experiments with collections to find out what they have, what they do, and how I can obtain the desired result.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |