Hooking up Views

I just purchased this book and I have been following and reading a number of other resources on Android/Kitlin development.
The first thing that comes to me is that the book is very easy to read and follow, however, I am wondering right off the bat why the author is declaring lateInit variables for each of the different textviews and the button.
Seems like redundant code to me.
Why is this necessary

internal lateinit var gameScoreTextView: TextView
internal lateinit var timeLeftTextView: TextView
internal lateinit var tapMeButton: Button

and then doing

gameScoreTextView = findViewById<TextView>(R.id.game_score_text_view)
timeLeftTextView = findViewById<TextView>(R.id.time_left_text_view)
tapMeButton = findViewById<Button>(R.id.tap_me_button)

You can simply access your controls directly by the ID:

For example, in the book, you do this:

val newScore = "Your Score: " + Integer.toString(score) 
gameScoreTextView.text = newScore”

when instead, you could have used the id to do this

val newScore = "Your score: " + Integer.toString(score)
game_score_text_view.text = newScore

similarly, with the onClickListener.
Instead of

tapMeButton.setOnClickListener{v -> incrementScore()}

you could have just used the ID

tap_me_button.setOnClickListener{v -> incrementScore()}

Seems like 6 lines of extra code.
Am I missing something?

Hi createch,

First of all thank you for purchasing the book. I’m thrilled to hear you’re finding it easy to follow.

The first few sections make use of findViewByID to introduce the reader to how Android maps XML views to Kotlin code. Whilst it’s not the only way of doing it, it is the original way and we felt it’s important for a reader to know this within their first few apps.

Further into the book, we do opt for the more concise approach of binding views you mention.

Thanks again!

Darryl