Programming in Swift: Fundamentals · Classes | raywenderlich.com


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/5539282-programming-in-swift-fundamentals/lessons/40

I can’t wait to start!

This example is just too difficult.
I mean, franchise, filmography, sequel, need to first google up what they mean lol.

i agree with @akashlal. even though i understand what all the words mean, the example feels overtly complicated compared to just using a simpler topic. i have understood everything up until this point and am getting the hang of structs and classes but the topic seems unnecessarily distracting compared to the previous examples provided throughout the lessons.

1 Like

I really liked this course. Even though I have some Swift experience, I found a lot of instances here where I said “Oh, so that’s what that’s for!” Really great work by Chris and the team. I also recommend doing the coding and following along. I don’t think I would have gotten nearly as much out of the course if I hadn’t been coding during the lessons and doing all of the challenges.

@dthiele Really glad you like it! Cheers! :]

@kali_posta Thank you for your feedback - much appreciated!

1 Like

Nice lesson, but I have a quick question. You changed the first two class instances to constants using let, but why not change all three? I guess what I’m asking is: why would you ever make a class object a variable, if you can still change its properties when it’s a constant?

let classAInstance1 = ClassA(…)
let classAInstance2 = ClassA(…)
classAInstance1 = classAInstance2 //Error

var classAInstance3 = ClassA(…)
var classAInstance4 = ClassA(…)
classAInstance3 = classAInstance4 //No Error

If you need something like this, you would need to use var. Else let would be fine