3 ms·
>Could Swift be the reason why Apple software post 2010ish has been so buggy? I'm just trying to put 2 and 2 together here because Swift was released with iOS7
by aphextron 9y ago
>Could Swift be the reason why Apple software post 2010ish has been so buggy? I'm just trying to put 2 and 2 together here because Swift was released with iOS7 circa 2010.
That makes a lot of sense to me. Swift is a great language, but it did a lot to turn iOS development into more like Javascript development. I fear that with the addition of garbage collection rather than reference counting, programmers have become lazy and forgotten they are still working within the constraints of what’s essentially an embedded device. In the Objective-C days, devs were more exposed to that side of things on a regular basis, and I think that experience deeply affects the way one thinks about resource usage and optimization. I have no doubt that a bulk of Apple’s application teams writing Swift today are former web devs, not systems or embedded developers as was the case when mobile software first came about from ‘07-‘12ish
- JimDabell 9y ago> Swift is a great language, but it did a lot to turn iOS development into more like Javascript development. I fear that with the addition of garbage collection rather than reference counting, programmers have become lazy and forgotten they are still working within the constraints of what’s essentially an embedded device. In the Objective-C days, devs were more exposed to that side of things on a regular basis Swift is nothing like JavaScript at all. It's not garbage-collected, it's reference counted with ARC – exactly like modern Objective-C.
- pjmlp 9y agoReference counting is a GC algorithm.
- ninkendo 9y agoThey’re not even close to the same thing though. ARC gives deterministic performance rather than GC’s effectively random pauses. Compare a UI framework that uses garbage collection on the hot path to one that uses ARC, it’s night and day when it comes to smooth animations and responsiveness.
- pjmlp 9y agoChapter 5 of "The Garbage Collection Handbook". http://gchandbook.org http://gchandbook.org One of the most acclaimed references about GC algorithms in Computer Science. Reference counting is a GC implementation algorithm. What you call GC, is a tracing GC algorithm. Cycle collectors for reference counting GC algorithms are also described on the book.
- ninkendo 9y ago... thanks. I'm aware people call refcounting garbage collection. That doesn't make an equivalency, and (to use your terms) it doesn't make tracing GC and refcounting the same thing. You're being needlessly pedantic, plenty of people have conversations about "refcounting vs GC", do you always come in with an "aaaactually, refcounting is a kind of GC" whenever you hear the discussions?
- pjmlp 9y agoSurely, learnig concepts the wrong way is worse than not learnig them at all. Putting two algorithms that belong to the same domain, automatic memory management, against each other, tends to lead to conclusions that aren't necessarily correct. For example, any reference counting implementation that uses cycle collectors or hazardous pointers, has a partial tracing GC implementation as well.
- ninkendo 9y agoI know I’m feeding a troll right now, but you haven’t shown that anyone here has learned anything the wrong way other than using the word GC in a different way than the book you linked. Yes, refcounting is a kind of GC. Very nice, you’re very smart. But colloquially nearly everyone knows what everyone else is talking about when they say “this uses refcounting” or “that uses GC”. We all know what each other mean, you’re being incredibly tedious by correcting people’s use of a very common term. Basically: shut up, we get it.