Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What areas are classes necessary assuming you’re talking about pure Swift and not iOS?



Where copying is expensive (most Swift collections are backed by classes for COW semantics). Where location stability is necessary (where you need a mutex). Resource allocation. Those are the primary examples that noncopyable types are meant to address.


Ah yes great examples, thank you for explaining.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: