Hacker Newsnew | past | comments | ask | show | jobs | submit | poorform's commentslogin

Why haven't I observed my old iPhone 4 or 5 spontaneously rebooting?


After my iPhone 3g's (not even 3G S) last update, it became noticeably slower. It became one of the main reasons I upgraded my phone. It never spontaneously rebooted, but it definitely became slow.

I ended up getting a Samsung Galaxy S5 in 2015. I've replaced the battery once after the original started swelling, and it's still going strong. I plan to next upgrade my phone in 2018/9. I'd be pissed if the OS updated and suddenly made it very slow before then!


iPhone 3GS had a 600 mhz 32 bit processor with only 256 megabytes of RAM. The last update for it was iOS 6. Like all operating systems, iOS's memory and CPU demands have grown over time, that's likely why your perceived performance suffered.


Less speed stepping, making battery prediction easier?


This is too sneaky and seems like poor form.

I'm curious what good use-case there is for this, that the language bothered to support and allow this to even compile.

Duplicate variable name declaration + referencing in the same scope is unintuitive at best, and just seems wrong.


Shadowing can be useful if you want to make sure the "old" variable is never referenced again in the same scope.

The reason why this idiom feels "weird" is that the loop construct of the language really ought to automatically make a fresh instance of the loop counter for each trip through the loop.


I don't feel that it's in more poor form than the solution suggested in the article:

    for i := 0; i < 3; i++ {
      defer func(i int) {
       fmt.Println(i)
      }(i)
    }
This shadows `i` pretty much the same amount as what I wrote. If `i` gets a different name inside the lambda, then it'd also be worse because then you could accidentally use `i` still.


I personally prefer the version presented in the article, but your version has at least one nice feature in that you can cleanly specify at the top of the loop body which variables are being shadowed.


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: