3 ms·
To someone unfamiliar with swift, it seems quite informative about the mechanics of unsafe pointers. Where it misses is in discussing how best to segregate the
by jepler 10y ago
To someone unfamiliar with swift, it seems quite informative about the mechanics of unsafe pointers. Where it misses is in discussing how best to segregate the "parts with unsafe" from "the bulk of your code (hopefully)", since the parts with unsafe by definition deserve more careful review and auditing (or even that you should do this sort of segregation)
There are probably many ways you could design the partition; for instance, I would probably try to design a safe API that was patterned closely after the underlying one (Posix, OpenGL, etc); others would prefer to design more Swift-ian APIs that still expose all the useful capabilities of the underlying libraries.