Computed Properties in Swift

Поділитися
Вставка
  • Опубліковано 27 гру 2024

КОМЕНТАРІ • 42

  • @shaxzodiskandarov8196
    @shaxzodiskandarov8196 3 роки тому +1

    You explain in a way that every learner can easily understand what you are talking about.I really appreciate your teaching way.

  • @asfandiyar5829
    @asfandiyar5829 Рік тому +1

    Perfect. Just what I wanted!

  • @sakshipatil9537
    @sakshipatil9537 2 роки тому +1

    Finally I understood new Value !! Thank you 🙏🏻

  • @joshuashires
    @joshuashires 3 роки тому +2

    Epic. Really good way of explain this by starting at what you used to do. Which is where most early programmers start and understand. Thanks.

  • @maila2359
    @maila2359 2 роки тому +1

    the way you explain is just so great, thank you so much for your videos Stewart, please don't stop!

    • @StewartLynch
      @StewartLynch  2 роки тому

      Thanks Maila. I don’t have that many more years left in me LOL, but as long as I can, I will continue.

  • @minhvokhai3162
    @minhvokhai3162 Рік тому +1

    this is dope, easy to understand. thank you

  • @trevormills
    @trevormills 3 роки тому +3

    Love the way you explain each subject Stewart - as a newbie it really helps my understanding - thanks!

    • @StewartLynch
      @StewartLynch  3 роки тому +1

      Glad you are finding them useful.

  • @tylerstarlock3230
    @tylerstarlock3230 4 роки тому +3

    Really like your style of videos, very clear and easy to comprehend. Keep going!

    • @StewartLynch
      @StewartLynch  4 роки тому +1

      Thanks. My plans are to release a new video every Sunday

  • @maxspeed2k
    @maxspeed2k 4 роки тому +1

    Mind blown!....I think I understand getters and setters much better. Great example.

  • @jarodpaulson1730
    @jarodpaulson1730 3 роки тому +1

    Thanks a lot for the clear, easily digestible explanation.

  • @byaruhaf
    @byaruhaf 4 роки тому +2

    when should one use "computed property" over a "method" in Swift?

    • @StewartLynch
      @StewartLynch  4 роки тому +2

      John Sundell answers this question better than I could in this blog www.swiftbysundell.com/tips/computed-properties-vs-methods/

  • @Денис-ж3ф5р
    @Денис-ж3ф5р 3 роки тому

    No wonder the video is clear as usual.

  • @joeprince7509
    @joeprince7509 4 роки тому +1

    Great and simple examples, thank you!

    • @StewartLynch
      @StewartLynch  4 роки тому

      Great. Glad you found it helpful. Check out the rest of my channel. Many more like this.

  • @Денис-ж3ф5р
    @Денис-ж3ф5р 3 роки тому

    so what's the difference between 1) var weeklySalary: Double { annualSalary / Double(weeksPerYear)} and 2) var weeklySalary: Double = annualSalary / Double(weeksPerYear) ? They both are calculated, aren't they?

    • @StewartLynch
      @StewartLynch  3 роки тому

      No, They are quite different. In case 1, the value is not stored so if you change the value for weeksPerYear later on in your code, weeklySalary will be adjusted, whereas in case 2 you are storing the value of weeklySalary when you create the variable so changing the value of weeksPerYear later in your code will not update the value for weeklySalary

    • @Денис-ж3ф5р
      @Денис-ж3ф5р 3 роки тому

      @@StewartLynch Thanks a lot. It’s so hard to memorize all of the details. I rewatch your videos all the time, even the cleanest explanation doesn’t help me remember from the first time.

    • @Денис-ж3ф5р
      @Денис-ж3ф5р 3 роки тому

      @@StewartLynch okay. Equal sign makes a variable to sorted, that’s logical. Thanks one more time.

    • @Денис-ж3ф5р
      @Денис-ж3ф5р 3 роки тому

      @@StewartLynch sorry for the typos, I am typing with a phone.

    • @StewartLynch
      @StewartLynch  3 роки тому

      Yes. You need to practice and use what you learn so you can remember.

  • @chillyo5920
    @chillyo5920 4 роки тому +3

    Keep it up! Digging the videos

    • @StewartLynch
      @StewartLynch  4 роки тому +2

      Thanks. Another series coming out on Sunday on JSON parsing and the Codable protocol

  • @nileshjdarji
    @nileshjdarji 2 роки тому

    how did you put these bold titles in the playground. Looks cool. let me know how I can do it.

    • @StewartLynch
      @StewartLynch  2 роки тому +1

      Editor Menu > Show Rendered Markup. It is Markup language that you can add as comments in your playgrounds.

  • @tigran.zakaryan
    @tigran.zakaryan 2 роки тому

    why did you multiply hrsPerDay by 5?

    • @StewartLynch
      @StewartLynch  2 роки тому

      Because I want to calculate the number of hours in a work week, and in Canada, where I am from, that is normally 5 days a week.

  • @MeineFresse10
    @MeineFresse10 3 роки тому +1

    very good tutorial - thank you

    • @StewartLynch
      @StewartLynch  3 роки тому

      I am pleased that people are starting to discover my channel.

  • @onkarkalpavriksha8676
    @onkarkalpavriksha8676 4 роки тому +1

    it was definitely useful !!!!! Thank you!

    • @StewartLynch
      @StewartLynch  4 роки тому

      Thanks for your complimentary comment. Much appreciated.

  • @yuricavalcante3288
    @yuricavalcante3288 2 роки тому

    Wow. It was very good. TKS

  • @eslamsaad2887
    @eslamsaad2887 20 днів тому

    It actually confused me, like how you added NEWValue without a clear use or explanations, you have highlighted it but still you didn't use it, which is making it unusable

    • @StewartLynch
      @StewartLynch  19 днів тому

      Can you give me a timestamp in the video so I can check out what you are referring to. This was created a long time ago

  • @dzulnain5440
    @dzulnain5440 4 роки тому

    thanks for the video

  • @mhfs61
    @mhfs61 3 роки тому

    👍🏼👍🏼👍🏼

  • @olegg649
    @olegg649 4 роки тому

    👍