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

Swift does offer this, though in a slightly weird way; structs (and I think arrays) are stack-allocated, classes are heap-allocated. Swift structs are more featureful than, say, C++; they mostly behave like classes, but live on the stack and are passed by value.


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

Search: